While we are adapting and verifying all our bits and pieces for PowerShell V3 and Windows 8, we sometimes stumble across little changes from PowerShell V2 behavior. Most of the time this is pretty simple and we can adapt our code to a new object or a change of where the information is located.
Sometimes however we come across a real bug. This is one of these instances. The following has been tested in Windows 8 RTM with the PowerShell V3 ISE (64 Bit).
Take the following simple script:
We will put a breakpoint on line 2 and hit run:
Now we put a breakpoint on line 4 and hit run
PowerShell V3 ignores the additional breakpoint and just runs to the end.
In V2 the engine stops at breakpoints applied after the start of a script while V3 simply ignores all breakpoints set after starting the script.
Using the corresponding set-psbreakpoint in the console window has the same effect, none that is.
Until this is fixed I suggest we all get used to setting breakpoints as required before starting a script.