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

Allowing to step over before loading a call stack and variables #25605

Closed
wcscmp opened this issue Apr 28, 2017 · 6 comments
Closed

Allowing to step over before loading a call stack and variables #25605

wcscmp opened this issue Apr 28, 2017 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality release-notes Release notes issues
Milestone

Comments

@wcscmp
Copy link

wcscmp commented Apr 28, 2017

Old issue was closed so I'm opening a new one.
#22807

Loading call stack and fetching local variables can be a long operations especially when there are a lot of threads started and call stacks are pretty long. Some debuggers (gdb for a example) allows you to do a step over before loading call stack or fetching local variables. Please allow debugger plugin to configure if it's ok to allow to step over before loading call stack and fetching variables.

@isidorn
Copy link
Contributor

isidorn commented Apr 28, 2017

Well call stack has to be known in order for the step to be "done", since the call stack deteremines the step location.
While the variables are fetched asynchrounisly. Namely, you should be able to step while the slow variables request is being completed (shown in the variables tree as a loading spinning icon)

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues under-discussion Issue is under discussion for relevance, priority, approach labels Apr 28, 2017
@isidorn isidorn added this to the Backlog milestone Apr 28, 2017
@wcscmp
Copy link
Author

wcscmp commented Apr 28, 2017

In order to know current location only the current frame is required. There is no need to know the whole call stack and most definitely there is no need to know call stacks of all the threads.

@isidorn
Copy link
Contributor

isidorn commented Apr 28, 2017

@wcscmp agree.
fyi @weinand

@isidorn isidorn added feature-request Request for new features or functionality and removed under-discussion Issue is under discussion for relevance, priority, approach labels Apr 28, 2017
@isidorn
Copy link
Contributor

isidorn commented Apr 28, 2017

After discussing with @weinand there is already a mechanism in the debug adapter protocol that the vscode only requests for 1 stack frame, after that is received it can request all the other stack frames.

An alternative approach would be that the stopped event has the top stack frame in the event, so vscode only requests the rest

Assigning to May to investigate

@isidorn isidorn modified the milestones: May 2017, Backlog Apr 28, 2017
@weinand
Copy link
Contributor

weinand commented May 11, 2017

@dbaeumer we plan to improve stepping performance in this milestone.

@isidorn
Copy link
Contributor

isidorn commented May 12, 2017

@wcscmp thanks for this great suggestion.

Now on each stop event we are only fetching the top stack frame, once that is done in the background with a delay we continue fetching the rest of the stack frames and the variables. If a new stop event occurrend we simply cancel the previous schedule of stackFrames fetching and variables - which in practice results that if a user quickly steps over his code we will only fetch variables and rest of the stack frame once he is idle.

@delmyers @gregg-miskelly @MSLaguana @DanTup @devoncarew @WebFreak001 @roblourens @andysterland @hbenl @lukaszunity @svaarala @ramya-rao-a @vadimcn @felixfbecker @daviwil @rkeithhill @DonJayamanne @MSLaguana @rebornix In order to benefit from this performance improvement debug adapters needs to support the startFrame and levels arguments in the StackTraceRequest.

Here's a performance comparision before and after the improvment:

before
after

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 feature-request Request for new features or functionality release-notes Release notes issues
Projects
None yet
Development

No branches or pull requests

3 participants