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

Call Stack window doesn't scroll to the active thread when a breakpoint is hit #68277

Closed
sean-mcmanus opened this issue Feb 8, 2019 · 23 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@sean-mcmanus
Copy link
Contributor

  • VSCode Version: 1.31.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Use the C/C++ extension to debug our Microsoft.VSCode.CPP.Extension.exe.
  2. Hit a breakpoint.

Bug: The call stack windows doesn't scroll to the thread that is active (paused on a breakpoint). Stepping causes some buggy scroll to occur, but it still doesn't scroll to the correct call stack. This makes it difficult to locate which thread call stack I'm currently debugging.

image

Does this issue occur when all extensions are disabled?: Yes, but needs the C/C++ extension to debug.

@vscodebot
Copy link

vscodebot bot commented Feb 8, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the new release label Feb 8, 2019
@sean-mcmanus
Copy link
Contributor Author

This is not a duplicate of the 2 issues mentioned by the bot.

@vscodebot vscodebot bot removed the new release label Feb 10, 2019
@weinand weinand removed their assignment Feb 11, 2019
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues bug Issue identified by VS Code Team member as probable bug labels Feb 11, 2019
@Jeff-Lewis
Copy link

Jeff-Lewis commented Feb 12, 2019

I get the similar behavior debugging using PowerShell extension. I see the Hit Line breakpoint on... in the Terminal but VSCode does not select ANY line in the Call Stack when a breakpoint is hit. The Explorer sections 'Variables' and 'Watch' are empty, which make it look like it's not debugging, but it is. If I manually select a line in the Call Stack, then the explorer panes load with debug info.

This occurs for most but not every launch configuration. For simple PS Launch Current File... type launches it appears to automatically select the top of the stack when a breakpoint is hit. Others it does not select any line in the stack. I'll have to spend some time isolating a simple repeatable case, which I won't be able to get to for a while...

@weinand
Copy link
Contributor

weinand commented Feb 14, 2019

This issue is most likely a duplicate of #68616.

See my comment for an explanation what's happening.

In your screencast I see some deemphasized top frames which explain why you are running into this issue.

Do you have an option to turn "deemphasizing top frames" off?

/cc @isidorn

@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 14, 2019
@vscodebot
Copy link

vscodebot bot commented Feb 14, 2019

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Feb 14, 2019
@pieandcakes
Copy link
Contributor

pieandcakes commented Feb 14, 2019

@weinand We don't do anything to signal that the frames are different. Is there something we should be sending in the protocol that we are not?

In Sean's original post those frames just have unknown source but i didn't think we were sending anything special for it.

@pieandcakes
Copy link
Contributor

Also based on this comment should the pointer be on the first available frame in the stack with it marked in green?

@weinand
Copy link
Contributor

weinand commented Feb 15, 2019

The first three frames are dimmed because they have no source. So it's probably not the DA that sends frames with the deemphasized hint.

@pieandcakes No, no you don't need to send anything special here.

Yes, if the first frame with source available is not the top frame, the pointer and the highlight should be green.

@isidorn when fixing #68616 please make sure that this works correctly.

@sean-mcmanus
Copy link
Contributor Author

@isidorn If this fix goes into Insiders, I can test our C++ scenario for you if you want.

@isidorn isidorn removed the *duplicate Issue identified as a duplicate of another issue(s) label Feb 25, 2019
@isidorn
Copy link
Contributor

isidorn commented Feb 25, 2019

@sean-mcmanus can you please verify this works correctly with latest vscode insiders?
Thank you

@sean-mcmanus
Copy link
Contributor Author

@isidorn The call stack is broken. It randomly won't scroll to the correct call stack, even when stepping or hitting breakpoints. For many cases it fails 100% of the time. Stepping is the main random case (50% failure?). I'm not able to observe any fixed behavior. I'm using:

Version: 1.32.0-insider (user setup)
Commit: 393b48d
Date: 2019-02-25T01:34:48.785Z
Electron: 3.1.3
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

@isidorn
Copy link
Contributor

isidorn commented Feb 26, 2019

Thanks for letting us know. For this we would aslo need the revealTo API which is probably coming for #68627
Reopening

@isidorn isidorn reopened this Feb 26, 2019
@isidorn isidorn added this to the February 2019 milestone Feb 26, 2019
@isidorn
Copy link
Contributor

isidorn commented Feb 26, 2019

@sean-mcmanus I can not reproduce this using the example in #68648
This feels like the same issue as #68627
When you say the call stack is broken you actually mean that the correct stack frame does not get revelead? Or it aslo does not get focussed? Or how exactly broken do you mean?

When this happens do you see some errors in F1 > developer tools > console

@isidorn isidorn added the info-needed Issue requires more information from poster label Feb 26, 2019
@sean-mcmanus
Copy link
Contributor Author

@isidorn Yeah, it could be #68627. By broken I mean the call stack that hit the "Paused on Breakpoint" is not scrolled to and it's not highlighted, making it hard to locate when there are 20+ threads. I'll send you an email with more screenshots.

There are no errors in the console.

@isidorn
Copy link
Contributor

isidorn commented Feb 27, 2019

It is alwas great when we have all the data in the issue, so no need for seperate emails.
Since I can not reproduce can you F1 > developer tools > put a breakpoint here and investigate what is going on.
Also note that we are looking into #68648 and #68627 so once of those might fix this. In the meantime moving this one to march.

@isidorn isidorn removed this from the February 2019 milestone Feb 27, 2019
@isidorn isidorn added this to the March 2019 milestone Feb 27, 2019
@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Feb 27, 2019

I got a repro and debugged it -- the updateSelectionAndReveal gets hit and the [element] is the correct call stack frame, but for some unknown reason the scroll and highlight fails. I got the exception "Errror: Data tree not not found: Microsoft.VSCode.CPP.Extension.exe!gcc_info::get_system_defaults..." with node "undefined", but I get those exceptions a lot so it could be "by design"? I'm not sure what else to look for when debugging. The repro probability seems higher the 1st time I debug and hit a breakpoint than with later calls.

Screenshot before updateSelectionAndReveal:
image
Screenshot after updateSelectionAndReveal (no scrolling occurred):
image

Also, here's a screenshot of the exception message when I got a different repro and then enabled Pause on Exceptions:
image

I could wait for those other issues to be fixed.

@isidorn
Copy link
Contributor

isidorn commented Mar 1, 2019

@sean-mcmanus thanks for looking into this.
I think this will not get fixed by the other issues.
I plan to investigate this more next week. For than can you please give me a step by step repro so I look on my machine? Please note that I do not know C++, so providing a full simple reproducable repository would be great.

@vscodebot vscodebot bot closed this as completed Mar 8, 2019
@vscodebot
Copy link

vscodebot bot commented Mar 8, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@isidorn isidorn reopened this Mar 8, 2019
@isidorn isidorn removed the info-needed Issue requires more information from poster label Mar 8, 2019
@lieff
Copy link

lieff commented Mar 12, 2019

I have same issue on Linux.

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2019

@joaomoreno here's another case of data tree node not found. Where I try to reveal something which is not known to the tree.
Smeels like a duplicate of #69950

So I suggest that we first fix that and then double check if this got fixed

@isidorn
Copy link
Contributor

isidorn commented Mar 21, 2019

@sean-mcmanus this should be fixed now. Can you please try it starting from Friday's vscode insiders. If you still see it let us know and we will reopen.

@isidorn isidorn closed this as completed Mar 21, 2019
@alexr00
Copy link
Member

alexr00 commented Mar 28, 2019

Verified because the probably duplicate is verified?

@alexr00 alexr00 added the verification-steps-needed Steps to verify are needed for verification label Mar 28, 2019
@isidorn
Copy link
Contributor

isidorn commented Mar 28, 2019

Yeah duplicate, removing bug label

@isidorn isidorn added *duplicate Issue identified as a duplicate of another issue(s) and removed bug Issue identified by VS Code Team member as probable bug verification-steps-needed Steps to verify are needed for verification labels Mar 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators May 5, 2019
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 *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

8 participants