I have a powershell script and I load a dll via [Reflection.Assembly]::Load
I want to place brakepoints into the source code of that dll, add watches etc.
Attaching to the powershell process didn't work (actually I tried the powershell ise). There are no other processes to attach to. Any ideas? Once an exception (it's my exception, so this supposed to happen) appeared in VS but I couldn't reproduce it.
As an alternative, you could create an helper class in your library:
namespace Something {
public static class DebugHelper {
public static void AttachDebugger() {
System.Diagnostics.Debugger.Launch();
}
}
}
Then, you can call that method from PowerShell, and you will get the debugger attached.
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