I am interested in developing a C# application that processes data, and to aid in filtering the data I plan to expose part of the application as an interpreted script via PowerShell. I think I have a good grasp on how to accomplish that (How to run PowerShell scripts from C#), but it would be extremely valuable to offer debugging capabilities like those offered in PowerShell ISE. Is there a way to attach ISE (or a similar debugger) to a PowerShell script that is being hosted within the C# program?
Part of the reasoning behind this is the flexibility that some of the components are fixed in nature, hence the compiled C# executable, but some of it needs to be easily altered at runtime. I envision a DataTable or List<> being passed from C# into PowerShell, with a similar return value from the script that would have parsed data.