We have created PS1 files.We are able to call the function in PS1 file from C# using Runspace,Pipeline etc.I am able to debug only upto "pipeline.Invoke()".
But now my question is whether it is possible to debug the PS1 file from pipile.Invoke()? I mean Pressing F11 on "pipeline.Invoke()" can take me into the PS1 files? I basically want to debug the powershell script files from C#.
It's possible, but not particularly feasible. You have to directly interact with the runspace's debugger events, and essentially build your own engine integrating that into Visual Studio. This would be quite a time consuming, which is why it hasn't been done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With