Skip to content

Commit 766e520

Browse files
authoredMay 26, 2020
Allow TS Server to be started with --inspect-brk (#98340)
1 parent 478ba18 commit 766e520

File tree

1 file changed

+3
-2
lines changed
  • extensions/typescript-language-features/src/tsServer

1 file changed

+3
-2
lines changed
 

‎extensions/typescript-language-features/src/tsServer/spawner.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ export class TypeScriptServerSpawner {
110110

111111
private getForkOptions(kind: ServerKind, configuration: TypeScriptServiceConfiguration) {
112112
const debugPort = TypeScriptServerSpawner.getDebugPort(kind);
113+
const inspectFlag = process.env['TSS_DEBUG_BRK'] ? '--inspect-brk' : '--inspect';
113114
const tsServerForkOptions: electron.ForkOptions = {
114115
execArgv: [
115-
...(debugPort ? [`--inspect=${debugPort}`] : []),
116+
...(debugPort ? [`${inspectFlag}=${debugPort}`] : []),
116117
...(configuration.maxTsServerMemory ? [`--max-old-space-size=${configuration.maxTsServerMemory}`] : [])
117118
]
118119
};
@@ -200,7 +201,7 @@ export class TypeScriptServerSpawner {
200201
// We typically only want to debug the main semantic server
201202
return undefined;
202203
}
203-
const value = process.env['TSS_DEBUG'];
204+
const value = process.env['TSS_DEBUG_BRK'] || process.env['TSS_DEBUG'];
204205
if (value) {
205206
const port = parseInt(value);
206207
if (!isNaN(port)) {

0 commit comments

Comments
 (0)
Please sign in to comment.