Running LSP throws error while running default build task
Running the prototype LSP inside vscode debugger throws the following error
The configured build task fails before opening Ext host. It doesn't work unless one explicitly runs npm run build inside _extension and then launch the Language service
Would be nice to have this one fixed or the docs is correctly updated.
Might help people without extension API knowledge to be able to test the LSP service
Running npm run build should not be required; the launch task should automatically work. What specifically did you do to make this occur?
- I cloned the repo (with submodules)
- npm ci in the root
- Opened the project in vs code
- Ran the Launch VS code debugger config
- The extension host opened with an activation error (see image)
I checked the watch/build task in the terminal and saw this error.
From the error I know the _extension dist folder never got generated thus I ran the build inside _extension folder manually and launched the debugger again and this time the extension is activated
I think the npm err seems obvious atleast in my machine, given there is no script called typescript-lsp in root package json
Do i need to do anything before launching the debugger ?
You steps don't include copying launch.template.json to launch.json. Did you do that too?
You steps don't include copying
launch.template.jsontolaunch.json. Did you do that too?
Oh yes I did that too
Might be ${workspaceRoot} issue make sure you opened the project in the folder.(code . in terminal)
The build I think has improved to fix this, but if you're just experimenting (which is what I think was happening these many months ago), just use the published VS Code extension.