In Visual Studio 2017 (or any other version), I want to add a breakpoint inside a Powershell script (*.ps1) that is invoked at runtime by a C# program.
For example, I have this C# code:
using System.Management.Automation
var powerShell = PowerShell.Create();
powerShell.AddCommand("script.ps1");
powerShell.Invoke();
How can I add a breakpoint in script.ps1 file that will be hit when powerShell.Invoke() is called ?
EDIT: I realize there's a similar 5-year old question, however a lot has changed since 2013 and possibly there's a way to do this now...