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

Current debug line is sometimes not highlighted correctly #41774

Closed
roblourens opened this issue Jan 17, 2018 · 5 comments
Closed

Current debug line is sometimes not highlighted correctly #41774

roblourens opened this issue Jan 17, 2018 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • Debug anything normally
  • Do a continue
  • Sometimes, immediately after a continue, see that the current line is either not highlighted at all, or is highlighted green instead of yellow

When I click on that frame in the callstack, it becomes highlighted correctly.

I don't have better repro steps - if you have never seen this, tell me where to set a breakpoint.

@roblourens roblourens added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 17, 2018
@isidorn
Copy link
Contributor

isidorn commented Jan 18, 2018

I have never seen this. The only way I can see something like this is using a recursive function like the following (place breakpoint on recursive call line. Then after continuing you can see the line very quickly turn green since that is expected due to the fact how we fetch frames and how the same line is also top stack frame and the one beneath it.

function fib(n) {
    if (n < 5) {
        return 1;
    }

    return fib(n - 1) + fib(n - 2);
}

fib(60);

In order to investigate better I suggest to put breakpoints here for decoration computations

Apart from that, an interesting place would be here if you think this is connected with how we first fetch the top stack frame and only then the rest.

@isidorn isidorn added the info-needed Issue requires more information from poster label Jan 18, 2018
@roblourens
Copy link
Member Author

Where is the code where we select the first stack frame? I notice that when the decoration isn't drawn at all, it has opened the correct file and scrolled to the right line, but the frame is not selected in the call stack.

@roblourens
Copy link
Member Author

I haven't been able to repro this while debugging. But I see it several times a day. Have you never seen it?

I did find better repro steps that may be related -

  • Start debugging
  • Hide the sidebar, or show a different viewlet besides Debug
  • Step
  • The current line is never highlighted

These steps repro 100% of the time.

This may be new of the past few days, because I think I would have noticed it earlier. But the original issue definitely reproes sometimes when the debug viewlet is active.

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jan 25, 2018
@isidorn isidorn added this to the January 2018 milestone Jan 25, 2018
@isidorn
Copy link
Contributor

isidorn commented Jan 25, 2018

@roblourens great catch and great repro steps.
The issue was coming from the fact that the call stack view was reacting on its own change of selected stack frame which caused too many times for the focused stack frame to change.
I also updated the call stack view to not do too much if not visible

@octref octref added the verified Verification succeeded label Feb 2, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants