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

Appearance settings

Conversation

@KirkMunro
Copy link
Contributor

@KirkMunro KirkMunro commented Sep 6, 2019

PR Summary

  • Adds an experimental -Runspace parameter Get-PSBreakpoint, Set-PSBreakpoint, Enable-PSBreakpoint, Disable-PSBreakpoint, and Remove-PSBreakpoint. This parameter is added to the "Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace" experimental flag that was added in PR Add APIs for breakpoint management in runspaces and enable attach to process without BreakAll for PSES #10338.
  • Refactors the classes behind the *-PSBreakpoint cmdlets so that they all work consistently. This refactoring did not change the behavior of these cmdlets beyond adding support for runspace breakpoint management, with one exception:
    • Changed the default parameter set for Enable-PSBreakpoint so that it is more performant when passed in breakpoints via a pipeline. The previous configuration for this cmdlet would always result in the "Id" parameter set being used, even when you pipe in a breakpoint. This change does not impact the functionality of the cmdlet -- it still accepts pipeline input and command line input with named or unnamed parameters the same way. The only visible impact is that this cmdlet will prompt users for a breakpoint instead of an ID now. See Issue Parameter binding pipeline input, and how the default parameter set influences that behavior #10188 for a discussion related to this.

PR Context

Now that the SDK has been enhanced to support breakpoint management in runspaces (see PR #10338), this PR builds on that work, exposing a common -Runspace parameter in all *-PSBreakpoint cmdlets so that users can use the same cmdlets to manage breakpoints in their local session or in a remote runspace.

PR Checklist

@iSazonov iSazonov added CL-Engine Indicates that a PR should be marked as an engine change in the Change Log CL-Experimental Indicates that a PR should be marked as an Experimental Feature in the Change Log labels Sep 6, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.4 milestone Sep 6, 2019
@iSazonov
Copy link
Collaborator

iSazonov commented Sep 6, 2019

@KirkMunro At first look there is a lot of style changes in the PR. Could you please move them in another PR? It would be nice for code review.

@KirkMunro
Copy link
Contributor Author

@KirkMunro At first look there is a lot of style changes in the PR. Could you please move them in another PR? It would be nice for code review.

@iSazonov I would rather not, unless I absolutely have to.

This PR was originally part of #10189, which they asked to be broken up into other PRs. After a side discussion between @TylerLeonhardt, @PaulHigin and @SteveL-MSFT, they suggested this set of changes (adding the -Runspace parameter and refactoring under the base classes) as the second phase of the #10189 changes in an email.

The only real "style changes" are replacement of cmdlet parameter property/field pairs with just properties, using static strings where appropriate (for parameter set names), and adding regions to make the set of breakpoint cmdlet classes consistent with one another. They were made while setting up base classes for the breakpoint cmdlets, which makes the code much easier to maintain going forward. I don't think they should really get in the way of this code review.

@iSazonov
Copy link
Collaborator

iSazonov commented Sep 6, 2019

@KirkMunro I only want to speed up a code review of the PR. It is possible for reviewer to check up to 500 lines of code at a time. The PR has over 1000 changes. Also style changes distract and slows down code review too.

@KirkMunro
Copy link
Contributor Author

KirkMunro commented Sep 6, 2019

Also style changes distract and slows down code review too.

The end result of the refactoring is leaner, consistent, better defined, DRY code that is easier to work with and maintain going forward. In this case, I don't believe separating some of the changes out into a separate PR buys us anything except for more work all around.

@adityapatwardhan
Copy link
Member

@PaulHigin Can you have a look at this?

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

I am not sure if this is the right direction to take for managing breakpoints in arbitrary runspaces. This has pretty big impact and so I feel there should be a formal design and sign-off before implementation. I'll add a committee review tag to get their opinion.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 12, 2019
@PaulHigin PaulHigin added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label Sep 12, 2019
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 12, 2019
@TravisEz13 TravisEz13 added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 16, 2019
@anmenaga anmenaga removed the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Sep 17, 2019
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 25, 2019
@TravisEz13 TravisEz13 removed this from the 7.1.0-preview.4 milestone May 22, 2020
@ghost ghost added the Stale label Jun 6, 2020
@ghost
Copy link

ghost commented Jun 6, 2020

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.

@ghost ghost removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept Stale labels Jun 13, 2020
@KirkMunro
Copy link
Contributor Author

@adityapatwardhan and @PaulHigin: I have merged in master and resolved all conflicts.

The single Codacy issue is incorrect, suggesting I should make a method static that cannot be made static. The PowerShell-CI-macos failures seem to have nothing to do with this PR.

I have also manually re-reviewed the code changes to ensure that nothing unexpected came from the merge.

From my perspective, this PR is good to go.

@adityapatwardhan
Copy link
Member

@PaulHigin Please re-review the PR. @KirkMunro Thanks for the updates

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

LGTM

@iSazonov
Copy link
Collaborator

@KirkMunro Please open new issue in PowerShell-Docs repository.

@ghost ghost added the Review - Needed The PR is being reviewed label Jun 24, 2020
@ghost
Copy link

ghost commented Jun 24, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@KirkMunro
Copy link
Contributor Author

@iSazonov: Docs issue filed, and this PR has been updated with the link at the top, so it should be good to go.

@adityapatwardhan
Copy link
Member

@KirkMunro Please resolve the merge conflict.

@ghost ghost removed the Review - Needed The PR is being reviewed label Jul 13, 2020
@KirkMunro
Copy link
Contributor Author

@adityapatwardhan: Done.

@adityapatwardhan adityapatwardhan added this to the 7.1.0-preview.7 milestone Jul 21, 2020
@adityapatwardhan adityapatwardhan merged commit 4729433 into PowerShell:master Jul 21, 2020
@adityapatwardhan
Copy link
Member

@KirkMunro Thank you for your contribution and your patience!

@ghost
Copy link

ghost commented Aug 17, 2020

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-Experimental Indicates that a PR should be marked as an Experimental Feature in the Change Log Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.