Open
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.