We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f2d047 commit bc2a048Copy full SHA for bc2a048
1 file changed
src/server/server.ts
@@ -349,13 +349,13 @@ namespace ts.server {
349
350
const execArgv: string[] = [];
351
for (const arg of process.execArgv) {
352
- const match = /^--(debug|inspect)(=(\d+))?$/.exec(arg);
+ const match = /^--((?:debug|inspect)(?:-brk)?)(?:=(\d+))?$/.exec(arg);
353
if (match) {
354
// if port is specified - use port + 1
355
// otherwise pick a default port depending on if 'debug' or 'inspect' and use its value + 1
356
- const currentPort = match[3] !== undefined
357
- ? +match[3]
358
- : match[1] === "debug" ? 5858 : 9229;
+ const currentPort = match[2] !== undefined
+ ? +match[2]
+ : match[1].charAt(0) === "d" ? 5858 : 9229;
359
execArgv.push(`--${match[1]}=${currentPort + 1}`);
360
break;
361
}
0 commit comments