-
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
server debug broken on the lsp-sample #836
Comments
@connor4312 could be please comment. You remove the attach configs in favor of We either need to bring the attach configs back or make the |
It's some kind of native crash, I was hoping the Electron 22 upgrade would fix things, so deferred investigation on it last iteration. (But then we delayed the Electron 22 migration due to other problems.) Using |
@TobiasLadner I have no idea how the
{
"name": "Attach to Server",
"type": "node",
"request": "attach",
"address": "localhost",
"port": 6009,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/server/out/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
Your break points in both client and server should now be hit: |
Impossible for me to hit a breakpoint on the server side, or even to display a console.log... |
Found the issue. Along with @gentledepp 's solution, you also need to change extension.ts to look like
The "Attach to Server" piece in launch.json needs to be paired with these debugOptions, both of which were removed from the git source, and the latter being present in the tutorial. I added this part in and the breakpointing worked for me |
Even with the changes from @gentledepp and @hlin-neo4j, I could not get breakpoints working. It is really too bad that sample code that is supposed to run out of the box doesn't work. I'm not sure I understand @connor4312's comment that |
I updated the dependencies and fixed the server debug problem. |
Thanks @dbaeumer However, I think most (if not all) of the other |
I will update the once that I own as well. |
The problem
According to the docs It should've been possible to debug both client and server, but there is no Attach to Server configuration in the
.vscode/launch.json
anymore and I could not find any other methods or documentation to make my server breakpoints hit when trying to debug.Steps to reproduce
cd
into the lsp-samplenpm install
andnpm run compile
client/src/extension.ts
server/src/server.ts
Initial thoughts
After running into this issue the first thing I noticed was the missing Attach to Server configuration, so I went to this repository and looked through the previous commits and found the following.
Possible solution
If nothing else breaks, we could maybe revert some of the configurations to that previous working state?
lsp-sample/.vscode/launch.json
dbee9a0#diff-767cc09063399b4f3bc13098f37ad284f1e1a4333cf28740ca5da00d5d451f23
lsp-sample/client/src/extension.ts
dbee9a0#diff-a6a41ed849771f4fda193238ec10d62e59f5bf1a09029b710852d17389105d3b
The text was updated successfully, but these errors were encountered: