diff --git a/packages/core/src/shared/lsp/utils/platform.ts b/packages/core/src/shared/lsp/utils/platform.ts index 44e68c423d2..4d242c3833e 100644 --- a/packages/core/src/shared/lsp/utils/platform.ts +++ b/packages/core/src/shared/lsp/utils/platform.ts @@ -36,8 +36,11 @@ export function createServerOptions({ execArgv: string[] }) { return async () => { - const debugArgs = isDebugInstance() ? '--inspect=6080' : '' - const lspProcess = new ChildProcess(executable, [debugArgs, serverModule, ...execArgv]) + const args = [serverModule, ...execArgv] + if (isDebugInstance()) { + args.unshift('--inspect=6080') + } + const lspProcess = new ChildProcess(executable, args) // this is a long running process, awaiting it will never resolve void lspProcess.run()