-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
multi process debug: breakpoints appear unverified as specified by last process #28817
Comments
There are a lot of reasons why breakpoints may not bind in the chrome debugger, and there are a bunch of tips for debugging this at https://github.com/Microsoft/vscode-chrome-debug. e.g. see the |
@roblourens However in this case it's the nodejs breakpoint that lose their sourceMaps, so the sourceMaps of the chrome extention are fine but the one directly is vscode are not. Is there some debug switch to see vscode's sourceMap resolving ? |
You said the backend configuration (node) works fine but the frontend (chrome)'s breakpoints are grayed out? |
I've edited the comment to hopefully be more clear |
Oh, I understand. Thanks. @isidorn could there be an issue with a file that's shared between two debug sessions? |
@roblourens not as far as I know, haved a shared file between two sessions should be no problem, since all breakpoints are sent to all sessions and vscode has no interpretation for source maps so each adapter handles them seperatly. |
@isidorn You can reproduce this with theia's repo here's how to do it:
You will then see the breakpoint is set properly. Now in a shell: do:
You will see your browser popup a page once the compile is done. Now insdie vscode:
You will see the breakpoint you had inserted before at But you can put a breakpoint in for example: Or any other place, that will work, but it will only trigger if that breakpoint is triggered by chrome, if you try to reset the breakpoint at theia/src/terminal/node/terminal-backend-module.ts:38 it will be set but it will never be hit. To test if the breakpoints hit you can do "File -> New Terminal" The terminal-backend breakpoint should hit in the nodejs process |
This is easy to repro @isidorn, just grab any node app with sourcemaps, duplicate a launch config, and to the second one, add something like
That will just prevent breakpoints from binding.
Not sure how you should show BPs that are bound in one process, and unbound in another. Maybe show them red if they are bound anywhere, but show a hover with the warning from the debug adapter + the name of the launch config? |
As you suggest: to simplify if one process says it is verified we show it as verified. @hexa00 Please check in tomorrow's insiders if this fixes your issue |
@isidorn my initial problem is that I wanted to have breakpoints active in both processes. This will change the apperance but I'm still left with the need to open 2 vscode instances to debug two processes that share a breakpoint. So from my point of view, this is not addressed and the issue should not have changed name... Could we rename it back ? I'd rather avoid creating a new one. |
@hexa00 I don't think there should be a problem with actually hitting the breakpoints in this case. If you aren't hitting breakpoints for the second launch config, it's probably due to it not being set up to resolve your sourcemaps correctly. Unless, it works when only running one launch config but not two at the same time. If you post the output of the |
This is what is happening for me. I'll send more info soon. |
Oh, strange. Let's continue over in the debug adapter repo, I opened microsoft/vscode-chrome-debug-core#257 for you. |
Steps for verifier, see above: #28817 (comment) |
I tried to verify it using the steps provided by @roblourens but it is not clear to me if I succeeded. I did:
What happening is nothing. The second program simple doesn't run. If this is what is expect now mark as verified. Otherwise please reopen. |
What do you mean it doesn't run, does it not even start the second launch config? That shouldn't happen. It should run but not hit the breakpoint. |
Just to recap (for the verifier): Problem: 3 Possible solutions:
Fix to be verified: @isidorn correct? |
@weinand correct. Though solution 2 sounds better since all our ux is sort of a slave to the active debug session. I can look into that in the future. |
I've verified that the solution 3 works as described |
VSCode Version:
Version 1.13.0
Commit 376c52b
Date 2017-06-08T16:41:25.571Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0
OS Version: Ubuntu 16.04
Context:
I have a debug config like so:
tsconfig.json like so :
Also an important detail the frontend and backend configuration share the same code.
Steps to Reproduce:
Start the Backend config
Start the Frontend config
Note that I have the impression that since the Backend config and the FrontEnd config share the same code the sourceMaps for a shared files are the ones of the last started debug config.
Could it be that the sourceMaps are global and not per debug config ?
The text was updated successfully, but these errors were encountered: