Skip to content

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

Closed

Description

@wcscmp

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.

Activity

  1. isidorn commented on Apr 28, 2017

    @isidorn

    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)

  2. added
    debugDebug viewlet, configurations, breakpoints, adapter issues
    under-discussionIssue is under discussion for relevance, priority, approach
    on Apr 28, 2017
  3. wcscmp commented on Apr 28, 2017

    @wcscmp
    Author

    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.

  4. isidorn commented on Apr 28, 2017

    @isidorn
  5. added
    feature-requestRequest for new features or functionality
    and removed
    under-discussionIssue is under discussion for relevance, priority, approach
    on Apr 28, 2017
  6. isidorn commented on Apr 28, 2017

    @isidorn

    After discussing with Andre Weinand (@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

  7. weinand commented on May 11, 2017

    @weinand
    Contributor

    Dirk Bäumer (@dbaeumer) we plan to improve stepping performance in this milestone.

  8. added a commit that references this issue on May 12, 2017
    1f12bc3
  9. isidorn commented on May 12, 2017

    @isidorn

    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.

    Del Myers (@delmyers) Gregg Miskelly (@gregg-miskelly) Jimmy Thomson (@MSLaguana) Danny Tuppeny (@DanTup) Devon Carew (@devoncarew) Jan Jurzitza (@WebFreak001) roblourens Andy Sterland (@andysterland) Holger Benl (@hbenl) lukaszunity Sami Vaarala (@svaarala) Ramya Rao (@ramya-rao-a) vadimcn Felix Becker (@felixfbecker) David Wilson (@daviwil) Keith Hill (@rkeithhill) Don Jayamanne (@DonJayamanne) Jimmy Thomson (@MSLaguana) Peng Lyu (@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

  10. locked and limited conversation to collaborators on Nov 18, 2017
  11. added 2 commits that reference this issue on Sep 6, 2026
    0ae9539
    45f50e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityrelease-notesRelease notes issues

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions