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
VS Code tries to get Call Stack data after a breakpoint resumption #103611
Comments
Hi, thanks for filling this. First forwarding to @connor4312 as he owns js-debug If you would like us to investigate more on the vscode side it would be great if you fork and make changes to mock debug so we can reproduce this issue locally https://github.com/microsoft/vscode-mock-debug |
@RedMickey are you able to collect a From what you're saying it sounds like the issue lies in the VS Code side of things with js-debug acting as a simple server responding to its requests, but the log will help us determine what's happening with greater certainty. |
Hi, @connor4312, I attach logs: |
Okay, thanks. This looks like maybe a VS Code bug.
cc @isidorn. I can probably make some synthetic example with js-debug or mock-debug if it would be helpful |
@connor4312 if it is not too much effort a repro with js-debug or mock-debug would be helpful.
|
Here's a branch: https://github.com/microsoft/vscode-mock-debug/tree/async-stack-ordering-bug I tested it by using the default config with |
@connor4312 thanks, assigning to me and to July so I investigate more. |
@connor4312 just looked into your repro, and for me it works just fine. I start debugging with @RedMickey @connor4312 Also you can not repro if delayed stack trace loading is set to false, correct. |
Try just clicking 'continue' after you stop on the first line |
Thanks for the repro case. I have verified that this fixes the repro case. |
Hi @isidorn . Tested in both Mock Debug and Cordova Tools scenarios. It seems that it doesn't reproduce anymore. Thank you. |
@SounD120 thanks for letting us know. Adding verified label. |
Hello, this is Cordova Tools team. Now we are reimplementing the debugger within the extension with vscode-js-debug usage.
While debugging some applications (e.g. Ionic Angular based) we faced such a behavior that after a breakpoint resumption VS Code sometimes opens additional tab with a source script. For example like this one:
We found out that this happens if we try to resume a breakpoint within 2-3 second after the stop. If we wait a bit more after the stop, VS Code won't open a tab with a source code after a resumption. We also found the code that handles stop events. Then we tried to debug it and revealed that for some reasons the
onDidStop
handler continues to work after a breakpoint resumption. In such a situation this condition becomestrue
(sincefocusedStackFrame
isundefined
), and then in this part of the code VS Code sends tojs-debug
debugger theSource
request, and the debugger sends theDebugger.getScriptSource
request to an application. Thus, we get a source script after a breakpoint resumption.It seems that there might be some conflicts in async functions work and data sharing between them in
js-debug
.Could you please tell us what can we do to fix it?
We can provide a demo if needed.
The text was updated successfully, but these errors were encountered: