Another PowerShell V3 breakpoint bug [UPDATED]

[UPDATE] Some users report that they cannot reproduce this behavior on Windows 8. Our Windows 8 machines show the same behavior. We will investigate further what the differences are.

DisabledBreakpoint

[END UPDATE]

As we previously reported here (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 has now discovered yet 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.

SNAGHTML794f905

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:

image

As you can see here, the ISE stops at the disabled breakpoint.

SNAGHTML7983fd5

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:

SNAGHTML79c06bb

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:

SNAGHTML79d58e0

Once again, PowerShell V3 stops at the disabled breakpoint. Using the V2 engine this does not happen and disable-psbreakpoint works as expected.