PowerShell / PowerShell/PowerShellEditorServices
Foreach -Parallel Breakpoints?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
Just thought I'd throw this discussion point out there.
If we know by the AST that someone is doing foreach -parallel, we are going to know the behavior. Can we hook into those created runspaces and drop breakpoints there, and then maybe monitor for them to go into InBreakpoint state and trigger the debugger there?
The net effect would be that users could put breakpoints in a Foreach -Parallel loop and expect it to break there for troubleshooting parallel runs, rather than the current procedure of removing -Parallel and any $USING references in order to debug.
Probably not feasible, lots of issues:
- How do we pause the other runspaces at the same time
- Have to fetch all the state and ensure it works the same thru all the existing tests
- etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. First determine where Foreach -Parallel creates and manages runspaces and how breakpoint and InBreakpoint state are handled. Done would require a defined design that supports breakpoints inside parallel loops while coordinating other runspaces and preserving existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100