Debugger does not break when debugging PowerShell console
- by Adam Driscoll
I'm developing a binary PowerShell module. I have a post build event that copies that module into the 'modules' directory in my "Documents\WindowsPowerShell" folder. I then have the project set to launch PowerShell.exe. My module is loaded via Import-Module and off I go.
The problem is my break points are never hit and the debugger does not break on exceptions. If I run PowerShell outside of Visual Studio and then attach the debugger to the process I can break just fine. The other strange this is that my break points are not empty. Typically if different source versions are loaded they will be.
I'm running Visual Studio 2010 on a Win 7 box. My module is currently targeting .NET 3.5. I've tried running both the x64 and x86 versions of PS with no luck.