Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
bd929b33
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd929b33
编写于
1月 22, 2021
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
logging - put storage tracing behind a flag to reduce spam
上级
b9c67304
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
20 addition
and
14 deletion
+20
-14
src/vs/base/parts/storage/node/storage.ts
src/vs/base/parts/storage/node/storage.ts
+7
-1
src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
.../code/electron-browser/sharedProcess/sharedProcessMain.ts
+1
-1
src/vs/code/electron-main/app.ts
src/vs/code/electron-main/app.ts
+6
-6
src/vs/code/electron-main/sharedProcess.ts
src/vs/code/electron-main/sharedProcess.ts
+3
-3
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+2
-2
src/vs/code/node/cliProcessMain.ts
src/vs/code/node/cliProcessMain.ts
+1
-1
未找到文件。
src/vs/base/parts/storage/node/storage.ts
浏览文件 @
bd929b33
...
...
@@ -412,11 +412,17 @@ export class SQLiteStorageDatabase implements IStorageDatabase {
}
class
SQLiteStorageDatabaseLogger
{
// to reduce lots of output, require an environment variable to enable tracing
// this helps when running with --verbose normally where the storage tracing
// might hide useful output to look at
static
readonly
VSCODE_TRACE_STORAGE
=
'
VSCODE_TRACE_STORAGE
'
;
private
readonly
logTrace
:
((
msg
:
string
)
=>
void
)
|
undefined
;
private
readonly
logError
:
((
error
:
string
|
Error
)
=>
void
)
|
undefined
;
constructor
(
options
?:
ISQLiteStorageDatabaseLoggingOptions
)
{
if
(
options
&&
typeof
options
.
logTrace
===
'
function
'
)
{
if
(
options
&&
typeof
options
.
logTrace
===
'
function
'
&&
process
.
env
[
SQLiteStorageDatabaseLogger
.
VSCODE_TRACE_STORAGE
]
)
{
this
.
logTrace
=
options
.
logTrace
;
}
...
...
src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
浏览文件 @
bd929b33
...
...
@@ -322,7 +322,7 @@ class SharedProcessMain extends Disposable {
return
;
}
logService
.
error
(
message
);
logService
.
error
(
`[uncaught exception in sharedProcess]:
${
message
}
`
);
});
}
}
...
...
src/vs/code/electron-main/app.ts
浏览文件 @
bd929b33
...
...
@@ -149,19 +149,19 @@ export class CodeApplication extends Disposable {
event
.
preventDefault
();
});
app
.
on
(
'
remote-get-global
'
,
(
event
,
sender
,
module
)
=>
{
this
.
logService
.
trace
(
`
A
pp#on(remote-get-global): prevented on
${
module
}
`
);
this
.
logService
.
trace
(
`
a
pp#on(remote-get-global): prevented on
${
module
}
`
);
event
.
preventDefault
();
});
app
.
on
(
'
remote-get-builtin
'
,
(
event
,
sender
,
module
)
=>
{
this
.
logService
.
trace
(
`
A
pp#on(remote-get-builtin): prevented on
${
module
}
`
);
this
.
logService
.
trace
(
`
a
pp#on(remote-get-builtin): prevented on
${
module
}
`
);
if
(
module
!==
'
clipboard
'
)
{
event
.
preventDefault
();
}
});
app
.
on
(
'
remote-get-current-window
'
,
event
=>
{
this
.
logService
.
trace
(
`
A
pp#on(remote-get-current-window): prevented`
);
this
.
logService
.
trace
(
`
a
pp#on(remote-get-current-window): prevented`
);
event
.
preventDefault
();
});
...
...
@@ -170,7 +170,7 @@ export class CodeApplication extends Disposable {
return
;
// the driver needs access to web contents
}
this
.
logService
.
trace
(
`
A
pp#on(remote-get-current-web-contents): prevented`
);
this
.
logService
.
trace
(
`
a
pp#on(remote-get-current-web-contents): prevented`
);
event
.
preventDefault
();
});
...
...
@@ -921,8 +921,8 @@ export class CodeApplication extends Disposable {
const
WindowsMutex
=
(
require
.
__$__nodeRequire
(
'
windows-mutex
'
)
as
typeof
import
(
'
windows-mutex
'
)).
Mutex
;
const
mutex
=
new
WindowsMutex
(
win32MutexName
);
once
(
this
.
lifecycleMainService
.
onWillShutdown
)(()
=>
mutex
.
release
());
}
catch
(
e
)
{
this
.
logService
.
error
(
e
);
}
catch
(
e
rror
)
{
this
.
logService
.
error
(
e
rror
);
}
}
...
...
src/vs/code/electron-main/sharedProcess.ts
浏览文件 @
bd929b33
...
...
@@ -202,9 +202,9 @@ export class SharedProcess extends Disposable implements ISharedProcess {
this
.
window
.
on
(
'
close
'
,
this
.
windowCloseListener
);
// Crashes & Unrsponsive & Failed to load
this
.
window
.
webContents
.
on
(
'
render-process-gone
'
,
(
event
,
details
)
=>
this
.
logService
.
error
(
`
[VS Code]: sharedProcess
crashed (detail:
${
details
?.
reason
}
)`
));
this
.
window
.
on
(
'
unresponsive
'
,
()
=>
this
.
logService
.
error
(
'
[VS Code]: detected unresponsive sharedProcess
window
'
));
this
.
window
.
webContents
.
on
(
'
did-fail-load
'
,
(
event
,
errorCode
,
errorDescription
)
=>
this
.
logService
.
warn
(
'
[VS Code]: fail to load sharedProcess
window,
'
,
errorDescription
));
this
.
window
.
webContents
.
on
(
'
render-process-gone
'
,
(
event
,
details
)
=>
this
.
logService
.
error
(
`
SharedProcess:
crashed (detail:
${
details
?.
reason
}
)`
));
this
.
window
.
on
(
'
unresponsive
'
,
()
=>
this
.
logService
.
error
(
'
SharedProcess: detected unresponsive
window
'
));
this
.
window
.
webContents
.
on
(
'
did-fail-load
'
,
(
event
,
errorCode
,
errorDescription
)
=>
this
.
logService
.
warn
(
'
SharedProcess: failed to load
window,
'
,
errorDescription
));
}
spawn
(
userEnv
:
NodeJS
.
ProcessEnv
):
void
{
...
...
src/vs/code/electron-main/window.ts
浏览文件 @
bd929b33
...
...
@@ -413,7 +413,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
// Crashes & Unrsponsive & Failed to load
this
.
_win
.
webContents
.
on
(
'
render-process-gone
'
,
(
event
,
details
)
=>
this
.
onWindowError
(
WindowError
.
CRASHED
,
details
));
this
.
_win
.
on
(
'
unresponsive
'
,
()
=>
this
.
onWindowError
(
WindowError
.
UNRESPONSIVE
));
this
.
_win
.
webContents
.
on
(
'
did-fail-load
'
,
(
event
,
errorCode
,
errorDescription
)
=>
this
.
logService
.
warn
(
'
[VS Code]: fail
to load workbench window,
'
,
errorDescription
));
this
.
_win
.
webContents
.
on
(
'
did-fail-load
'
,
(
event
,
errorCode
,
errorDescription
)
=>
this
.
logService
.
warn
(
'
Main: failed
to load workbench window,
'
,
errorDescription
));
// Window close
this
.
_win
.
on
(
'
closed
'
,
()
=>
{
...
...
@@ -552,7 +552,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
private
onWindowError
(
error
:
WindowError
.
UNRESPONSIVE
):
void
;
private
onWindowError
(
error
:
WindowError
.
CRASHED
,
details
:
RenderProcessGoneDetails
):
void
;
private
onWindowError
(
error
:
WindowError
,
details
?:
RenderProcessGoneDetails
):
void
{
this
.
logService
.
error
(
error
===
WindowError
.
CRASHED
?
`
[VS Code]: renderer process crashed (detail:
${
details
?.
reason
}
)`
:
'
[VS Code]
: detected unresponsive
'
);
this
.
logService
.
error
(
error
===
WindowError
.
CRASHED
?
`
Main: renderer process crashed (detail:
${
details
?.
reason
}
)`
:
'
Main
: detected unresponsive
'
);
// If we run extension tests from CLI, showing a dialog is not
// very helpful in this case. Rather, we bring down the test run
...
...
src/vs/code/node/cliProcessMain.ts
浏览文件 @
bd929b33
...
...
@@ -178,7 +178,7 @@ class CliMain extends Disposable {
return
;
}
logService
.
error
(
message
);
logService
.
error
(
`[uncaught exception in CLI]:
${
message
}
`
);
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录