PoshRSJob icon indicating copy to clipboard operation
PoshRSJob copied to clipboard

Option to run synchronously for debugging

Open MatthewMWR opened this issue 8 years ago • 3 comments

Please forgive weird typing on mobile.

When I want to step through my scriptblock for debugging, I have to refactor my calling code to use Foreach-Object or Invoke-Command. This is a pain as it is not just search replace, but I also have to rethink how I am passing args, etc. It would be great if Start-RsJob could be asked to run the scriptblock serially and synchronously (in current rs) to allow for step through debugging.

I don't much care what the trigger would be. It could be be -Throttle 0, or a new switch like -ForceSynchronous, or maybe something out of band like an environment variable if people want to be able to trigger this without modifying script.

Whatever the trigger, I just want to be able to step through my scriptblock in production context without surgically removing start-rsjob from my scripts.

MatthewMWR avatar Aug 09 '16 03:08 MatthewMWR

Maybe even just -Debug

martin9700 avatar Aug 09 '16 09:08 martin9700

@MatthewMWR Thanks for the explanation on this! I already have an update planned to release (1.6.0.0) so this one will be added in the follow on release (1.6.1.0).

proxb avatar Aug 09 '16 14:08 proxb

is this implemented?

apobekiaris avatar Dec 26 '18 02:12 apobekiaris