Another PowerShell V3 breakpoint bug
- Written by Alexander Riedel
- Last Updated: 19 April 2016
- Created: 27 March 2013
- Hits: 6669
As previously reported, (PowerShell V3 breakpoint bug) PowerShell V3 has a serious breakpoint bug where breakpoints cannot be set or removed after a script has been started.
Our team also discovered another breakpoint related bug in V3, which basically renders Disable-PSBreakpoint inoperative. It just doesn’t work. Let me illustrate with the Microsoft Powershell V3 ISE under Windows 7 SP1.
We open a simple four line script.
Yes, it has Write-Host in it, it doesn’t matter. I set a breakpoint at line 15, as indicated by the coloring. Now we go and disable the breakpoints using this:
As you can see here, the ISE stops at the disabled breakpoint.
Well, it could be that it’s just the ISE that has a bug, so lets try another way. After closing the ISE, restarting it and loading the file again, we do this:
This time we use cmdlets to set and disable the breakpoint. The coloring in the file shown above changes accordingly as you execute the cmdlets.
Now start the script:
Once again, PowerShell V3 stops at the disabled breakpoint. Using the V2 engine this does not happen and disable-psbreakpoint works as expected.
Some users report that they cannot reproduce this behavior on Windows 8, however our Windows 8 machines show the same behavior.