Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8f18471e
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8f18471e
编写于
4月 27, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
introduce debugBrkFileWatcherPort (for #5819)
上级
3b300f7f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
26 addition
and
6 deletion
+26
-6
src/vs/platform/workspace/common/workspace.ts
src/vs/platform/workspace/common/workspace.ts
+1
-0
src/vs/workbench/electron-main/argv.ts
src/vs/workbench/electron-main/argv.ts
+1
-0
src/vs/workbench/electron-main/env.ts
src/vs/workbench/electron-main/env.ts
+3
-0
src/vs/workbench/electron-main/window.ts
src/vs/workbench/electron-main/window.ts
+1
-0
src/vs/workbench/electron-main/windows.ts
src/vs/workbench/electron-main/windows.ts
+1
-0
src/vs/workbench/services/files/electron-browser/fileService.ts
.../workbench/services/files/electron-browser/fileService.ts
+8
-2
src/vs/workbench/services/files/node/fileService.ts
src/vs/workbench/services/files/node/fileService.ts
+2
-1
src/vs/workbench/services/files/node/watcher/unix/watcherService.ts
...kbench/services/files/node/watcher/unix/watcherService.ts
+9
-3
未找到文件。
src/vs/platform/workspace/common/workspace.ts
浏览文件 @
8f18471e
...
...
@@ -123,6 +123,7 @@ export interface IEnvironment {
disableExtensions
:
boolean
;
logExtensionHostCommunication
:
boolean
;
debugBrkFileWatcherPort
:
number
;
verboseLogging
:
boolean
;
enablePerformance
:
boolean
;
...
...
src/vs/workbench/electron-main/argv.ts
浏览文件 @
8f18471e
...
...
@@ -20,6 +20,7 @@ export interface ParsedArgs extends minimist.ParsedArgs {
performance
:
boolean
;
verbose
:
boolean
;
logExtensionHostCommunication
:
boolean
;
debugBrkFileWatcherPort
:
string
;
'
disable-extensions
'
:
boolean
;
extensionHomePath
:
string
;
extensionDevelopmentPath
:
string
;
...
...
src/vs/workbench/electron-main/env.ts
浏览文件 @
8f18471e
...
...
@@ -28,6 +28,7 @@ export interface ICommandLineArguments {
verboseLogging
:
boolean
;
debugExtensionHostPort
:
number
;
debugBrkExtensionHost
:
boolean
;
debugBrkFileWatcherPort
:
number
;
logExtensionHostCommunication
:
boolean
;
disableExtensions
:
boolean
;
extensionsHomePath
:
string
;
...
...
@@ -169,6 +170,7 @@ export class EnvService implements IEnvironmentService {
const
debugExtensionHostPort
=
getNumericValue
(
argv
.
debugPluginHost
,
5870
,
this
.
isBuilt
?
void
0
:
5870
);
const
pathArguments
=
parsePathArguments
(
this
.
_currentWorkingDirectory
,
argv
.
_
,
argv
.
goto
);
const
timestamp
=
parseInt
(
argv
.
timestamp
);
const
debugBrkFileWatcherPort
=
getNumericValue
(
argv
.
debugBrkFileWatcherPort
,
void
0
);
this
.
_cliArgs
=
Object
.
freeze
({
pathArguments
:
pathArguments
,
...
...
@@ -178,6 +180,7 @@ export class EnvService implements IEnvironmentService {
debugExtensionHostPort
:
debugBrkExtensionHostPort
||
debugExtensionHostPort
,
debugBrkExtensionHost
:
!!
debugBrkExtensionHostPort
,
logExtensionHostCommunication
:
argv
.
logExtensionHostCommunication
,
debugBrkFileWatcherPort
:
debugBrkFileWatcherPort
,
openNewWindow
:
argv
[
'
new-window
'
],
openInSameWindow
:
argv
[
'
reuse-window
'
],
gotoLineMode
:
argv
.
goto
,
...
...
src/vs/workbench/electron-main/window.ts
浏览文件 @
8f18471e
...
...
@@ -403,6 +403,7 @@ export class VSCodeWindow {
if
(
this
.
isPluginDevelopmentHost
&&
cli
)
{
configuration
.
verboseLogging
=
cli
.
verboseLogging
;
configuration
.
logExtensionHostCommunication
=
cli
.
logExtensionHostCommunication
;
configuration
.
debugBrkFileWatcherPort
=
cli
.
debugBrkFileWatcherPort
;
configuration
.
debugExtensionHostPort
=
cli
.
debugExtensionHostPort
;
configuration
.
debugBrkExtensionHost
=
cli
.
debugBrkExtensionHost
;
configuration
.
extensionsHomePath
=
cli
.
extensionsHomePath
;
...
...
src/vs/workbench/electron-main/windows.ts
浏览文件 @
8f18471e
...
...
@@ -918,6 +918,7 @@ export class WindowsManager implements IWindowsService {
configuration
.
extensionDevelopmentPath
=
currentWindowConfig
.
extensionDevelopmentPath
;
configuration
.
verboseLogging
=
currentWindowConfig
.
verboseLogging
;
configuration
.
logExtensionHostCommunication
=
currentWindowConfig
.
logExtensionHostCommunication
;
configuration
.
debugBrkFileWatcherPort
=
currentWindowConfig
.
debugBrkFileWatcherPort
;
configuration
.
debugBrkExtensionHost
=
currentWindowConfig
.
debugBrkExtensionHost
;
configuration
.
debugExtensionHostPort
=
currentWindowConfig
.
debugExtensionHostPort
;
configuration
.
extensionsHomePath
=
currentWindowConfig
.
extensionsHomePath
;
...
...
src/vs/workbench/services/files/electron-browser/fileService.ts
浏览文件 @
8f18471e
...
...
@@ -41,10 +41,11 @@ export class FileService implements IFileService {
private
messageService
:
IMessageService
)
{
const
configuration
=
this
.
configurationService
.
getConfiguration
<
IFilesConfiguration
>
();
const
env
=
this
.
contextService
.
getConfiguration
().
env
;
// adjust encodings (TODO@Ben knowledge on settings location ('.vscode') is hardcoded)
let
encodingOverride
:
IEncodingOverride
[]
=
[];
encodingOverride
.
push
({
resource
:
uri
.
file
(
this
.
contextService
.
getConfiguration
().
env
.
appSettingsHome
),
encoding
:
encoding
.
UTF8
});
encodingOverride
.
push
({
resource
:
uri
.
file
(
env
.
appSettingsHome
),
encoding
:
encoding
.
UTF8
});
if
(
this
.
contextService
.
getWorkspace
())
{
encodingOverride
.
push
({
resource
:
uri
.
file
(
paths
.
join
(
this
.
contextService
.
getWorkspace
().
resource
.
fsPath
,
'
.vscode
'
)),
encoding
:
encoding
.
UTF8
});
}
...
...
@@ -60,9 +61,14 @@ export class FileService implements IFileService {
encoding
:
configuration
.
files
&&
configuration
.
files
.
encoding
,
encodingOverride
:
encodingOverride
,
watcherIgnoredPatterns
:
watcherIgnoredPatterns
,
verboseLogging
:
this
.
contextService
.
getConfiguration
().
env
.
verboseLogging
verboseLogging
:
env
.
verboseLogging
,
debugBrkFileWatcherPort
:
env
.
debugBrkFileWatcherPort
};
if
(
typeof
env
.
debugBrkFileWatcherPort
===
'
number
'
)
{
console
.
warn
(
`File Watcher STOPPED on first line for debugging on port
${
env
.
debugBrkFileWatcherPort
}
`
);
}
// create service
let
workspace
=
this
.
contextService
.
getWorkspace
();
this
.
raw
=
new
NodeFileService
(
workspace
?
workspace
.
resource
.
fsPath
:
void
0
,
fileServiceConfig
,
this
.
eventService
);
...
...
src/vs/workbench/services/files/node/fileService.ts
浏览文件 @
8f18471e
...
...
@@ -47,6 +47,7 @@ export interface IFileServiceOptions {
watcherIgnoredPatterns
?:
string
[];
disableWatcher
?:
boolean
;
verboseLogging
?:
boolean
;
debugBrkFileWatcherPort
?:
number
;
}
function
etag
(
stat
:
fs
.
Stats
):
string
;
...
...
@@ -128,7 +129,7 @@ export class FileService implements files.IFileService {
}
private
setupUnixWorkspaceWatching
():
void
{
this
.
workspaceWatcherToDispose
=
new
UnixWatcherService
(
this
.
basePath
,
this
.
options
.
watcherIgnoredPatterns
,
this
.
eventEmitter
,
this
.
options
.
errorLogger
,
this
.
options
.
verboseLogging
).
startWatching
();
this
.
workspaceWatcherToDispose
=
new
UnixWatcherService
(
this
.
basePath
,
this
.
options
.
watcherIgnoredPatterns
,
this
.
eventEmitter
,
this
.
options
.
errorLogger
,
this
.
options
.
verboseLogging
,
this
.
options
.
debugBrkFileWatcherPort
).
startWatching
();
}
public
resolveFile
(
resource
:
uri
,
options
?:
files
.
IResolveFileOptions
):
TPromise
<
files
.
IFileStat
>
{
...
...
src/vs/workbench/services/files/node/watcher/unix/watcherService.ts
浏览文件 @
8f18471e
...
...
@@ -24,18 +24,24 @@ export class FileWatcher {
private
ignored
:
string
[],
private
eventEmitter
:
IEventService
,
private
errorLogger
:
(
msg
:
string
)
=>
void
,
private
verboseLogging
:
boolean
)
{
private
verboseLogging
:
boolean
,
private
debugBrkFileWatcherPort
:
number
)
{
this
.
isDisposed
=
false
;
this
.
restartCounter
=
0
;
}
public
startWatching
():
()
=>
void
{
const
args
=
[
'
--type=watcherService
'
];
if
(
typeof
this
.
debugBrkFileWatcherPort
===
'
number
'
)
{
args
.
push
(
`--debug-brk=
${
this
.
debugBrkFileWatcherPort
}
`
);
}
const
client
=
new
Client
(
uri
.
parse
(
require
.
toUrl
(
'
bootstrap
'
)).
fsPath
,
{
serverName
:
'
Watcher
'
,
args
:
[
'
--type=watcherService
'
]
,
args
,
env
:
{
AMD_ENTRYPOINT
:
'
vs/workbench/services/files/node/watcher/unix/watcherApp
'
,
PIPE_LOGGING
:
'
true
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录