-
Notifications
You must be signed in to change notification settings - Fork 68
On stackTrace should provide stack trace for any live thread #72
Comments
|
The behavior we want is to only break the thread that had the breakpoint. Other threads should continue to run. This is the expected behavior in VSC. |
This is not the expected behavior in VS – we will need both.
|
Agreed, both are needed. So looks like for VS we will have to set the |
We should ask them to make it a feature flag in the protocol in the future, to support other clients. |
Even with that flag event order seems to be a problem. If i have a breakpoint set in a worker function, then when the breakpoint is hit, the Further there are issues with how we handle individual debuggind steps:
|
Can we default to VSC behavior and pass through an init flag from VS to change to “always break/continue all threads” and then handle it all in ptvsd? That may be a useful flag for VSC users too.
We may need to get the debug adapter to prefer breakpoint threads over stopped threads when they all come in at once.
|
@int19h suggested wrapping the code in pydevd where they generate the thread suspended events with start/end events (see |
@karthiknadig @MikhailArkhipov |
This is not done yet. We have following pending items:
|
The part related to pydevd is on my todo-list (my current item is path mapping issues across platforms and right after this deal with the thread suspension policy). |
@karthiknadig @fabioz Would be great if we have separate issues for those and linked them in here. That way we know what the pre-requisites are for this issue to be looked at. I.e. easier to track the status of this. Please add a checked list of dependencies on the top comment, as follows:
|
Starting to take a look at this. |
After working a bit on how to provide a message saying that all threads are suspended I got into corner cases where this cannot be reliably done because to actually pause a thread some tracing event is required, but by pausing a thread it's possible that we get into situations where this never happens and waiting for such a message would not work (i.e.: it would effectively deadlock). I'm posting an example below where this happens:
So, not sure how to proceed... the feature requested seems to be getting the stack of threads even if they're not paused, so, maybe the best approach would be actually implementing that feature (creating a @karthiknadig do you think that's reasonable? |
@fabioz We will need the |
@karthiknadig ok, will work on that. Although I'll only start those next Monday as I ended up chasing a deadlock today -- there's a pull request for it with the fix at: #591 -- I got reports from it when using |
Following items are pending on ptvsd side:
|
Can't we use this approach to get stack trace of suspended threads as well. Instead of using the current approach of strong some stack trace into a variable. I.e. request on demand. |
microsoft/PTVS#3736
The text was updated successfully, but these errors were encountered: