490 likes | 620 Views
Debugger Update SUG, May 2010. George Walter, Sirius Software. Focus of Talk. Present the last year’s Debugger development Review the year before last, since there was no SUG in 2009, and not everyone may have seen the Insight debugger presentation
E N D
Debugger UpdateSUG, May 2010 George Walter, Sirius Software
Focus of Talk • Present the last year’s Debugger development • Review the year before last, since there was no SUG in 2009, and not everyone may have seen the Insight debugger presentation • Unless otherwise stated, the information pertains to both debuggers • Quick review of the User Interface… Sirius Software
Get the latest client: • Build 50, released April 2010… • Full Client installer: http://sirius-software.com/debclient.zip • Client Exe only: http://sirius-software.com/debexeonly.zip • Documentation Files: http://sirius-software.com/debdoc.zip Sirius Software
Documentation Online • sirius-software.com/maint/download/jdebugr.pdf • sirius-software.com/products/jdeb2.html Sirius Software
Debugger Update (May 2010) • Better Window Management • Exclude “Uninteresting” Code • Better PC File Management • Record Viewing • Execution History • Color • Macros • Watch Expansion • More Items to Watch • Windows 7 • .NET Framework Sirius Software
Better Window Management • For large/multiple monitors: in Build 50 (April 2010), the following may now be viewed in separate windows: • Audit Trail • Execution Trace • Watch Window • Web Buffer • These can be accessed via the Window menu and new open and close commands. Sirius Software
Window Menu: Open Windows Close Windows Access Windows Sirius Software
Open/Close Window Commands • {open|close}ExternalAuditTrailWindow • {open|close}ExternalExecutionTraceWindow • {open|close}ExternalWatchWindow • {open|close}ExternalWebBufferWindow Sirius Software
External Audit Trail Window Sirius Software
External Watch Window Sirius Software
Tab Navigation Commands • selectAuditTab • selectSourceTab • selectWebBufferTab • selectExecutionTraceTab • selectProcSelectionTab • selectNextTab Sirius Software
Tab Navigation Commands • Can be mapped to button or hotkey or used in a macro • Work with the corresponding external window • Mapped to a hotkey, these commands permit “no mouse” tab/window selection Sirius Software
Mapping Example <mapping command="selectNextTab" key="n" keyModifier="ctrl" /> <mapping command="selectAuditTab" key="1" keyModifier="ctrl" /> <mapping command="selectSourceTab" key="2" keyModifier="ctrl" /> <mapping command="selectWebBufferTab" key="3" keyModifier="ctrl" /> <mapping command="selectExecutionTraceTab" key="4" keyModifier="ctrl" /> <mapping command="selectProcSelectionTab" key="5" keyModifier="ctrl" /> Sirius Software
Less Window Modality • Value Display • View Text • Expand Object • These windows can remain open while you do other things. Sirius Software
Exclude “Uninteresting” Code • With Build 47+ and 7.6+ Mods: • Exclude arbitrary chunks of code via “exclude on” and “exclude off’ • Exclude procedures by name/pattern • Exclude methods/routines by name/pattern • In excluded code, selected parts may be still be debugged using “Include” directives • Excluded code is NOT sent to the workstation Sirius Software
Code Fragment with Excluded Lines Sirius Software
!debugger Directives • !debugger exclude on/off can be used to bracket code to be excluded (not debugged) • !debugger include on/off can be used to include code for debugging in a block that is being excluded • !debugger exclude/include proc can be used to select included procedures for debugging exclusion or inclusion Sirius Software
!debugger Directives • ! debugger exclude/include routine can be used to select methods/subroutines for debugging exclusion or inclusion • Trailing wildcards may be used in proc, subroutine and method names, e.g., p-init* Sirius Software
Debugger Directive Syntax !debugger {exclude} {on } {include} {off } {proc pspec } {routine rspec} Sirius Software
Alternative to the Directives • In the debugger client, you may create and maintain lists of excluded and included procedures and routines • With this method, NO code changes are needed Sirius Software
Maintain Include and Exclude Lists from the “Proc Selection” tab… Sirius Software
Better PC File Management • In Build 48+, you can control the location of: • State files such as logs and window position memory files • UI customization files (ui.xml) • Debugger macros (nnn.macro) • Set in debuggerConfig.xml… Sirius Software
Better PC File Management <stateFileFolder> path </stateFileFolder> <uiFolder> path </uiFolder> <macroLibraryFolder> path </macroLibraryFolder> Sirius Software
Record Viewing • Get a PAI display for the current record • With M204 Version 7.2, get a PAFGI display for the current field group • PAI/PAFGI available from the Data Display menu and as commands that can be mapped to buttons or hotkeys • Mods Version 7.6+ required Sirius Software
PAI Sample (Data Display->PAI) Sirius Software
PAFGI Sample (Data Display->PAFGI) Sirius Software
Execution History • At any point, answers “how did I get here?” • Shows calls/returns • Available via “Execution->Get History” and getHistory command Sirius Software
History: Sirius Software
Color Coded Comments Both comment styles are supported and the color is settable… Sirius Software
Macro Improvements • AutoRun macros • MacroTrace on/off • SetM204Data • New functions Sirius Software
AutoRun Mode for Macros • If selected in Preferences… • When a proc is compiled, and • A debugger macro with the same name is found • The macro is run • This permits custom setup or testing macros to automatically be run for any given proc Sirius Software
MacroTrace on/off • Debug Macros • When on, commands are logged to the macro console; The results of asserts also are logged. >>>macroTrace: step >>>macroTrace: assert %i = 1 >>>passed... >>>macroTrace: run >>>macroTrace: step >>>macroTrace: assert %i = 2 >>>passed... Sirius Software
SetM204Data • Can set Model 204 variables in a macro: setM204Data %xxx = 1111 setM204Data g.next=‘p.foo’ Sirius Software
New Macro Functions • &&assertFailureCount – number of failed asserts in current macro • &&assertSuccessCount – number of successful asserts in current macro • &&assertStatus– string indicating testing status based on asserts: macroTrace on>>>macroTrace: echo &&assertStatusMacro message: Assert Summary: Failed: 0, Succeeded: 17 Sirius Software
New Macro Functions • &&procName name of current proc • &&searchSuccess Boolean success result of last search • &&searchResult line number of last search, or -1 Sirius Software
Improved Watch Expansion • From a right click on a watched item • “Serialize” watched XmlDocs/XmlNodes • Expand ArrayLists (like stringLists and $lists) Sirius Software
Serial View of XMLDoc Sirius Software
Additional Items to Watch • Parameters (p.parameterName) • User buffer for LOB/MQ applications (u.buffer) • $STATUS/$STATUSD (Mods 7.6+) • $CURREC (Mods 7.6+) • $FIELDGROUPID (M204 7.2+) • $FIELDGROUPOCCURRENCE (M204 7.2+) Sirius Software
Windows 7 Support • Build 50 or better required for proper client operation with Windows 7: • Problem with IE Proxy setting fixed • First build that had full QA cycle with Windows 7 Sirius Software
.NET Runtime Upgrade • Next Release of the Debugger Client with be based on the .NET 3.5 runtime • Faster • Many fixes in the runtime • Better language and GUI features to exploit going forward Sirius Software
Wrap UP • Quick overview of Preferences • Command Display Screen Sirius Software
Coming Soon • More syntax color coding • Reserved words • Variables • More improved Window management (make using the tabs optional) • Dockable windows Sirius Software