8

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

0

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.