Archive for May, 2008

V2: Debugger for Graphical PowerShell V2 CTP2

V1 is here…


What’s new in V2
  • ProcessDebuggerStop is called dot-sourced, so that debug expressions are invoked in the current scope and normally you can change local variables directly;
  • Local variables of ProcessDebuggerStop moved to $global:__DebuggerStop members (to avoid clashes with real variables and debug expressions);
  • 10 ($__DebuggerStop.MaximumHistoryCount) last debug expressions are kept in history and shown in the dialog, you can copy and paste them;
  • <enter> repeats the last step or step-over command (similar to ConsoleHost).
  • Added two new debug commands (Keith Hill’s idea and the code):
    • <number>: show debug location in context of <number> lines;
    • + <number>: set location context preference to <number> lines ($__DebuggerStop.ShowDebugLocation). Default is 0, so that only position messages are shown; if it is positive then debug location is shown in context of <number> of lines.

Download: (EDIT: the next version is here…


Leave a comment

Debugger for Graphical PowerShell V2 CTP2

Graphical PowerShell V2 CTP2 still looks like a demo, basically speaking. Nevertheless, I find it already suitable for some tasks. Unfortunately it does not implement a few host features including default breakpoint debugger action. Breakpoints without action are simply ignored. Fortunately PowerShell provides a way to solve this. Here it is: simple and yet practically useful Add-Debugger.ps1. The archive also contains Test-Debugger.ps1 to play with and see how debugging goes (in any host, actually). Follow instructions in the script headers.

Download: (EDIT: the next version is here…)

Leave a comment