Why won't PowerShell ISE let me set breakpoints when running as Administrator?

Kev picture Kev · Dec 6, 2010 · Viewed 15.1k times · Source

Having failed to get PowerGUI to work properly I've fallen back on PowerShell ISE. However if I run this as Administrator it won't let me set any breakpoints.

If I launch as normal (my login is a member of Administrators) all is well but because I need to script some tasks that require full administrator rights this is no good.

I have saved the script as a proper file (i.e. it's not "untitled1.ps1") but no joy.

I'm running Windows 7 x64 Ultimate.

Strangely this doesn't seem to be a problem on my Windows 2008 R2 dev box (I'm logging in as user that is a member of Administrators then running PS ISE "As Administrator" and breakpoints are set and hit.

Any ideas why this would be?

Answer

Vinay picture Vinay · Nov 10, 2016

I also faced the same issue, Saving the file to a physical location enabled all debugging capabilities.