-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot debug server in lsp-web-extension-sample #645
Comments
@connor4312 can you help with how a user can attach the VS Code debugger to a web worker thread. @Skleni you should be able to debug this using the debugger from the Developer Tools. |
js-debug doesn't attach to other webworkers aside from the webworker extension host right now. |
OK. This seems to be related to how the debugger is working in VS Code. |
Just coming in here to say I ran into this too. I can't even figure out where console logs from the worker are being printed. This seems worth figuring out and mentioning in the guide. The only way I've figured out to get information out of the server code is to throw an error, which gets reported in the LSP trace logs. |
@dbaeumer from testing the example today it looks like this is still an issue. If there is a problem with the debugger in vscode (still?) I suggest updating the readme for this sample. vscode reports this when trying to attach to the server: |
@aeschli can you please have a look. You wrote the example. I have updated the dependencies and fixed the code, however the Readme instructions are incorrect since this is a Web example and the server needs to be debugged differently (e.g. the package json has only a browser entry). |
I updated the readme and fixed source maps. Debugging the server is currently broken / never worked, I opened issue microsoft/vscode#204114 You can debug the server when running in the web browser. |
very nice! looks like the underlying issue is actually being fixed as well, which is great! :) //ej |
@aeschli Looks like this issue now has been resolved. Probably a good idea to update the example again, to also attach to server (and edit readme.md) ? :) |
I'm able to run the lsp-web-extension-sample and it does what it's supposed to do. I'm not able to debug or even get any log messaged from the LSP server/web worker though.
The readme says:
When I do that, it briefly shows up, but disappears again after a few seconds:
Breakpoints aren't bound:

Also, there are no log messages. For example the the message
running server lsp-web-extension-sample
isn't shown in any of the output channels nor in the debug console. What the debug console does show is the following error:I don't know if that's connected to one or both of the problems described above, but I also have no idea why the file isn't there and how I can fix it.
As I said, the language server itself is working correctly (the colors are visualized), I'm just not able to debug it or get any log messages to appear.
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: