Debugger does not break when debugging PowerShell console

Posted by Adam Driscoll on Stack Overflow See other posts from Stack Overflow or by Adam Driscoll
Published on 2010-05-24T21:27:37Z Indexed on 2010/05/24 21:31 UTC
Read the original article Hit count: 341

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.

© Stack Overflow or respective owner

Related posts about .net-3.5

Related posts about visual-studio-2010