Skip to content
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

Node debug is not sending a 'thread' event when a new thread gets created #15176

Closed
isidorn opened this issue Nov 8, 2016 · 4 comments
Closed
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Nov 8, 2016

Node debug is currently not sending a 'thread' event when a new thread gets created. This is problematic for the vscode model since it is not aware of any threads unless a stopped event occurs. This leads to the limitation discussed in #15165

fyi @roblourens

@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 8, 2016
@weinand
Copy link
Contributor

weinand commented Nov 8, 2016

from the documentation:

"After a successful launch or attach VS Code requests the baseline of currently existing threads with the threads request and then starts to listen for thread events to detect new or terminated threads. Even if your debug adapter does not support multiple threads, it must implement the threads request and return a single (dummy) thread. The id of this thread must be used in all requests where a thread id is required, e.g. stacktrace, pause, continue, next, stepIn, and stepOut."

So instead of sending a thread event, we'll have to find a way that you can reliably call a threads request.

@weinand weinand assigned isidorn and unassigned isidorn and weinand Nov 8, 2016
@isidorn isidorn added this to the November 2016 milestone Nov 8, 2016
@isidorn
Copy link
Contributor Author

isidorn commented Nov 8, 2016

It is just a time when this should be done. After the response from initializing request is recieved by vscode?

Though it feels cleaner to me that the adapter sends a thread event and we change the documentation. I understand this is a breaking change in a way but since this was never working in practice it will just be the change of docs.

@weinand
Copy link
Contributor

weinand commented Nov 9, 2016

@isidorn try to send the ThreadsRequest after the ConfigurationDoneRequest (or the legacy SetExceptionBreakpointsRequest).

Sending events for an old baseline state doesn't feel 'clean' because those events are basically sent out a second time (but at the first time no one was listening). The scenario is: start a server process and connect a debugger to it. The server will create new threads and sends thread events for them. Then restart the debugger. The new debugger should be able to pick up the already existing threads even if he missed the originals events.

In addition we had long discussions about thread events vs. threadRequest and came to the conclusion that thread events are optional and that debugAdapters don't have to send them. So I'm pretty sure that no existing debugAdapter sends out a threadEvent on connect.

@isidorn isidorn closed this as completed in 6c2e3fc Nov 9, 2016
@isidorn isidorn added the verification-needed Verification of issue is requested label Nov 9, 2016
@isidorn
Copy link
Contributor Author

isidorn commented Nov 9, 2016

To verify make sure you can pause a debug session even if it did not stop prior

@weinand weinand assigned weinand and unassigned isidorn Dec 7, 2016
@weinand weinand added the verified Verification succeeded label Dec 7, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants