-
Notifications
You must be signed in to change notification settings - Fork 2.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
debug: make allThreadStop reason generic #6627
Conversation
This PR aligns Theia's UI with VS Code. |
Please elaborate how with which extension which setup. |
@akosyakov updated |
fca964a
to
f3fddd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code-wise it makes sense to me
I tested debugging Java with a small multi-threaded program and did not notice any problems vs master. |
I will investigate this call stack issue a bit more before thinking about merging. |
@marechal-p As you mentioned offline, when debugging C/C++ on theia master, the stack frames fetched are bogus - they are a copy of the stack frames of the thread that stopped on the breakpoint, not of the selected thread. So the issue I found above may not be as bad as I initially thought. |
When we receive a stopped event from a debug adapter, a `allThreadStopped` flag can be set. When doing so, it feels weird to display the reason of the thread that caused it on other threads. This commit reports "PAUSED" for all the paused threads, but keeps displaying the reason for the thread that caused the event. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
f3fddd9
to
106a529
Compare
@marcdumais-work the C++ debug adapter I have been using is not really good at fetching stack frames for threads paused with the |
Ok, let me check with the latest version of this PR. |
@marechal-p Java debugging is still good with latest version of this PR 👍 |
What it does
When we receive a stopped event from a debug adapter, a
allThreadStopped
flag can be set. When doing so, it feels weird todisplay the reason of the thread that caused it on other threads.
This commit reports "PAUSED" for all the paused threads, but keeps
displaying the reason for the thread that caused the event.
How to test
Run a multi-threaded debug session that pauses every thread when one hit a breakpoint hit. The latter should be stopped with reason "PAUSED ON BREAKPOINT", while all the others threads should just display "PAUSED".
I used the following vscode extension and workspace (linux/mac? only)
Run the task "Build C++", then you should be able to debug using the "Debug C++" configuration. Place a breakpoint on line 6 to break inside a function that runs in a separate thread.
Review checklist
Reminder for reviewers