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

Multi thread debugging: wrong Paused on Breakpoint label #29547

Closed
dbaeumer opened this issue Jun 27, 2017 · 16 comments
Closed

Multi thread debugging: wrong Paused on Breakpoint label #29547

dbaeumer opened this issue Jun 27, 2017 · 16 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Milestone

Comments

@dbaeumer
Copy link
Member

Tests: #29168

  • VSCode Version: 1.14 test pass
  • OS Version: Windows

Steps to Reproduce:

  1. C# setup as described in Test: Multi threaded delayed call stack fetching #29168
  2. Set a breakpoint in one of the threads.
  3. The UI shows:

capture

Although the first two threads are not paused.

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jun 27, 2017
@isidorn isidorn added this to the July 2017 milestone Jun 27, 2017
@dbaeumer
Copy link
Member Author

Actually it looks like that under C# the VM stops. Setting a breakpoint in A and B first hits one breakpoint and when pressing continue the second one is hit. So when the VM is stopped I should be able to inspect that call stacks of all threads.

@isidorn isidorn modified the milestones: June 2017, July 2017 Jun 27, 2017
@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label Jun 28, 2017
@isidorn
Copy link
Contributor

isidorn commented Jun 28, 2017

@dbaeumer great catch!

@dbaeumer
Copy link
Member Author

dbaeumer commented Jun 29, 2017

Still see it on

capture

Should it be fixed there ? It is the build from last night

@isidorn
Copy link
Contributor

isidorn commented Jun 29, 2017

Yeah it shuold be fixed there -> reopening to see if I can also repro with latest

@isidorn isidorn reopened this Jun 29, 2017
@isidorn
Copy link
Contributor

isidorn commented Jun 29, 2017

I just tried with latest insiders and I can not repro both on Win and on Mac.
I think we are using the same sample program so I can only ask you to try again with latest insiders?

I believe the original issue is fixid, so pushing this one to july to see why it is not working for you

@isidorn isidorn modified the milestones: July 2017, June 2017 Jun 29, 2017
@dbaeumer
Copy link
Member Author

I see this on todays insider:

capture

@isidorn
Copy link
Contributor

isidorn commented Jun 30, 2017

And when you click on Thread 1 and Thread 2 they can not be expanded?

@isidorn isidorn added the info-needed Issue requires more information from poster label Jun 30, 2017
@dbaeumer
Copy link
Member Author

dbaeumer commented Jul 3, 2017

I see this when expanding:

capture

@isidorn
Copy link
Contributor

isidorn commented Jul 3, 2017

@dbaeumer I think that is exected behavior. What would you expect there?
I am not sure what is the issue currently?

@dbaeumer
Copy link
Member Author

dbaeumer commented Jul 4, 2017

@isidorn IMO the thread B is not paused on a breakpoint. Otherwise we would have a stop on line 31. But all threads are labels as "Paused on Breakpoint". Since thread B is actually running the UI should indicate that. To my knowledge a breakpoint in a multi threaded environment can either only stop the thread where the break point is hit or all threads. The UI should indicate that.

@vscodebot vscodebot bot closed this as completed Jul 11, 2017
@vscodebot
Copy link

vscodebot bot commented Jul 11, 2017

This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our guidelines for filing issues. Thank you for your contributions.

@dbaeumer
Copy link
Member Author

Reopening issue.

@chrmarti I guess the bot closed the issue since @isidorn owns it and I filed it (both MS employees) and I didn't count as the one providing the needed information.

@dbaeumer dbaeumer reopened this Jul 11, 2017
@chrmarti
Copy link
Collaborator

@dbaeumer Correct. Maybe the bot should check if the creator is from the team and in that case leave the bug open. It's not clear though if that will improve things overall.

@isidorn isidorn removed the info-needed Issue requires more information from poster label Jul 17, 2017
@isidorn
Copy link
Contributor

isidorn commented Jul 26, 2017

This is coming from the debug adapter. VS Code will show the stopped reason per thread, however the c# debug adapter gives reason "breakpoint" for each stopped thread.
I have filled an issue in the C# extension here dotnet/vscode-csharp#1667

@isidorn isidorn closed this as completed Jul 26, 2017
@isidorn isidorn added *caused-by-extension Issue identified to be caused by an extension and removed bug Issue identified by VS Code Team member as probable bug labels Jul 26, 2017
@gregg-miskelly
Copy link
Member

@isidorn I don't understand what you are expecting the extension to return. The debug adapter just sends one stopped event and uses "allThreadsStopped": true. I think the suggestion in this issue would be in this case to use a more generic reason for the other threads.

Here is an example stopped event from the C# debug adapter:

{
  "seq": 27,
  "type": "event",
  "event": "stopped",
  "body": {
    "reason": "breakpoint",
    "threadId": 21448,
    "allThreadsStopped": true,
    "source": {
      "name": "Program.cs",
      "path": "d:\\proj\\cliasynctest\\Program.cs"
    },
    "line": 11,
    "column": 14
  }
}

@isidorn
Copy link
Contributor

isidorn commented Jul 31, 2017

@gregg-miskelly yes you are right, the issue comes from the vscode side when we are cloning the stopped deatils in the allThreadsStopped case here

Thus reopening and setting to august

@isidorn isidorn reopened this Jul 31, 2017
@isidorn isidorn removed the *caused-by-extension Issue identified to be caused by an extension label Jul 31, 2017
@isidorn isidorn modified the milestones: August 2017, July 2017 Jul 31, 2017
@isidorn isidorn closed this as completed in 6a93a71 Aug 5, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 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
Projects
None yet
Development

No branches or pull requests

4 participants