Skip to content

Commit 5bbea3e

Browse files
authored
fix(amazonq): language server fails to start in non-debug mode (#6538)
## Problem The leading `''` when not in debug mode made the process start but not accept any events ## Solution Only prepend the `inspect` args when required --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 2157f55 commit 5bbea3e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/core/src/shared/lsp/utils/platform.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ export function createServerOptions({
3636
execArgv: string[]
3737
}) {
3838
return async () => {
39-
const debugArgs = isDebugInstance() ? '--inspect=6080' : ''
40-
const lspProcess = new ChildProcess(executable, [debugArgs, serverModule, ...execArgv])
39+
const args = [serverModule, ...execArgv]
40+
if (isDebugInstance()) {
41+
args.unshift('--inspect=6080')
42+
}
43+
const lspProcess = new ChildProcess(executable, args)
4144

4245
// this is a long running process, awaiting it will never resolve
4346
void lspProcess.run()

0 commit comments

Comments
 (0)