Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Breakpoint Label frame to optimize debug stepping performance #2190

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

Merged
JustinGrote merged 3 commits into main from feature/breakpointLabelFrame
Dec 3, 2024

Conversation

@JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote commented Oct 12, 2024
edited
Loading

PR Summary

Implements DAP DelayedStackTraceLoading and returns an artificial breakpoint label frame based on the invocation info ASAP once the debugger stops. The rest of the stack trace is then returned on a future request that doesn't block the client UI.

Capture.mp4

PR Context

Debug stepping takes 300ms+ due to waiting for stack trace collection via the slow Get-PSCallStack "hack". Further improvements will come around this later.

@JustinGrote JustinGrote changed the title (削除) Add Breakpoint label frame to optimize debug stepping performance (削除ここまで) (追記) Add Breakpoint Label frame to optimize debug stepping performance (追記ここまで) Oct 12, 2024
Copy link
Collaborator Author

JustinGrote commented Oct 12, 2024
edited
Loading

@SeeminglyScience @andyleejordan I made this a fairly minimal PR to be easy to review. Additional things I plan to do next as future incrementals

  • Add start/end/column positioning to all stack frames (it's available in the position property, just has to be serialized properly)
  • Separate variable and frame processing into independent resolution paths
  • Implement "fast path" for local runspace sessions to use the runspace debugger properties and methods rather than going thru the pipeline to fetch the frame info, ~2-3ms vs 300ms-800ms
  • Move all the scope/stack/variable resolution to a new async-based DebugStoppedContext class that can be disposed and re-instantiated cleanly and kept separate from the DebugService concerns, since LSP spec says no IDs/etc. should be reused between debug adapter stop/resumes

Copy link
Member

@SeeminglyScience @andyleejordan I made this a fairly minimal PR to be easy to review. Additional things I plan to do next as future incrementals

  • Add start/end/column positioning to all stack frames (it's available in the position property, just has to be serialized properly)
  • Separate variable and frame processing into independent resolution paths
  • Implement "fast path" for local runspace sessions to use the runspace debugger properties and methods rather than going thru the pipeline to fetch the frame info, ~2-3ms vs 300ms-800ms
  • Move all the scope/stack/variable resolution to a new async-based DebugStoppedContext class that can be disposed and re-instantiated cleanly and kept separate from the DebugService concerns, since LSP spec says no IDs/etc. should be reused between debug adapter stop/resumes

I'm super excited for all of this.

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeeminglyScience and I are going to take a closer look at this just to be sure nothing got missed.

@JustinGrote JustinGrote force-pushed the feature/breakpointLabelFrame branch from 3fbc7b7 to cc2e2a1 Compare November 16, 2024 16:50
@andyleejordan andyleejordan requested a review from a team as a code owner November 18, 2024 18:53
@JustinGrote JustinGrote force-pushed the feature/breakpointLabelFrame branch from cc2e2a1 to f052fa5 Compare November 19, 2024 00:24
Copy link
Collaborator Author

This has been rebased to the latest prerelease and is good for re-review.

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Justin! Couple of questions and minor requests

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving this, we finally got to review through it. Just a couple changes requested and then we want to get into pre-release.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no suggestions.

Copy link
Collaborator Author

@andyleejordan @SeeminglyScience your opinions have officially been deemed irrelevant by our AI overlords, please approve as is /s
image

andyleejordan reacted with laugh emoji

@JustinGrote JustinGrote force-pushed the feature/breakpointLabelFrame branch from 939e2c4 to 84b55f8 Compare November 27, 2024 03:33
@JustinGrote JustinGrote force-pushed the feature/breakpointLabelFrame branch 2 times, most recently from 47a2634 to 9414af6 Compare December 2, 2024 05:27
Copy link
Collaborator Author

All feedback should be addressed. I also removed some of the TraceOutput log stuff I was experimenting with, I'm going to submit a separate test-specific PR to revamp the DAP E2E tests.

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YOLO, I mean I love it and it's been thoroughly reviewed. Thanks Justin! Excited to get this out.

JustinGrote reacted with hooray emoji
@JustinGrote JustinGrote merged commit a5aaad8 into main Dec 3, 2024
8 checks passed
@JustinGrote JustinGrote deleted the feature/breakpointLabelFrame branch December 3, 2024 22:41
Copy link
Collaborator Author

@andyleejordan this wording sounded so unnecessarily passive aggressive, LOL
image

Thanks! Excited to speed this up, it's annoyed me for YEARS.

andyleejordan reacted with laugh emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

@andyleejordan andyleejordan andyleejordan approved these changes

@SeeminglyScience SeeminglyScience Awaiting requested review from SeeminglyScience

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /