-
Notifications
You must be signed in to change notification settings - Fork 8.1k
WIP: Breakpoint management for runspaces #10189
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
WIP: Breakpoint management for runspaces #10189
Conversation
src/System.Management.Automation/resources/DebuggerStrings.resx
Outdated
Show resolved
Hide resolved
|
@KirkMunro Is it possible to split the PR on some small ones? The PR is so large that we can wait too long for approval. |
That sounds like quite a bit more work, with little tangible value; however, a "review map" might help. Here is a break down of the changes in each file, with like changes grouped together to allow them to be reviewed more easily. Between these extra details and being able to mark files as viewed in the GitHub UI, I think it should be much easier for others to review this PR. Cleanup of changes done in @TylerLeonhardt's other PR that this supercedes
Changes for Pester tests
Changes to support
|
|
I'll try to take a look at this later this week, but may not get to it until the following week. Since this is such a large change I will mark it for committee review. |
|
@PaulHigin FYI for when you do get to look at this: I'm experiencing an intermittent issue with my In the PR that this supercedes, @TylerLeonhardt switched many of the collections to their concurrent equivalent, and he updated the breakpoint ID increment to be thread safe as well. Those changes were preserved through this PR work. I know little about how the MS-PSRDP plumbing works other than what I learned while working on this PR, so I wanted to let you know what I ran into so that you could have a look when you get to this review work because so far I can't figure out the root cause. |
|
Phase 2 of splitting this up: PR #10492, that includes the |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@KirkMunro Please resolve merge conflicts. |
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
PR Summary
-RunspaceparameterGet-PSBreakpoint,Set-PSBreakpoint,Enable-PSBreakpoint,Disable-PSBreakpoint, andRemove-PSBreakpoint.*-PSBreakpointcmdlets so that they all work consistently. This refactoring did not change the behavior of these cmdlets beyond adding support for runspace breakpoint management.New-PSBreakpointexperimental cmdlet in favor of working with the older, more well known*-PSBreakpointcmdlets for runspace breakpoint management.DebugRunspaceCommandandDebugJobCommandso that they both derive from a commonPSRemoteDebugCmdletbase class. As part of this refactoring, some of the resource strings have been moved to be co-located with the new base class where they are used.SetCommandBreakpoint,SetVariableBreakpoint,SetLineBreakpoint,EnableBreakpoint,DisableBreakpoint, andRemoveBreakpointpublic APIs to theDebuggerclass, plumbs them through the engine, and hooks them up for remote debugger work. Also hooks up theGetBreakpoint,GetBreakpoints, andSetBreakpointsDebuggerclass APIs for remote debugger work.-NoInitialBreakexperimental parameter toDebug-RunspaceandDebug-Jobthat allows users to attach the debugger without invoking aBreakAll. The corresponding methods for the same have boolean parameters allowing this as well.PR Context
This PR was opened in response to this discussion between @TylerLeonhardt, @PaulHigin and I.
It helps because:
Debug-*to attach the debugger to that runspace. This provides a better, more PowerShell-oriented approach to debugging.BreakAllin PSES.*-PSBreakpointcmdlets.Debug-RunspaceandDebug-Job, as defined inDebugRunspaceCommandandDebugJobCommand, respectively, had a lot of duplicated logic and a few unintentional differences. Moving these classes into a shared base class structure eliminates the unintentional differences and removes the duplicated code.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.