An improved Bold System Debugger form
Over the course of development I've made a few changes and additions to the Bold system debugger form. I call the result my Better Debugger. Here are a few of the changes:
- Debugger menu item in active form's system menu
- Dirty object counter in toolwindow
- OCL evaluator with MRU list, OCL editor form and Eval in PS option
- OCL operations rootable to any object
- Buttons to update or discard any or all dirty objects
- Method list for selected class
- Derived members in grid identified by background color and Derivation OCL hint
- Several bugs left as an excersize for the reader :)
- Display of dirty object state (New, Deleted, Modified)
- Dirty count window displays per-class count
- Most Recently Used list for classes
- OCL editor properly rooted (contributed fix)
- Index out of bounds error in grid fixed (contributed fix)
- Drag-n-drop area to launch Default Autoform for an object
- Bold root class name determined dynamicly
- Bold regular expression filter on class list
- Better hint handling for grid OCL hints
- Grid context menu to show and hide columns by class
- Grid columns of type TBoldObjectReference highlighted in green
- Removed all temporary object creation for the purpose of listing members and retrieving method addresses (which are unused in this verison of the debugger). Objects that used CreateComplete should no longer have that method executed by a double click in the class list.
The Better Debugger:
The debugger form includes some hints that provide a little info about what various things do. The dirty object counter form has a hint indicating that it can be double clicked to close it.
Installation and Usage
Install the form in a common directory (unless you intend to modify it for each project). Then simply add it to your project (or put it on the library path and use it in any unit).
The unit includes an init section that inserts menus for the debug form in the active form and application system menus. These menus can be accessed by right clicking on the active form title bar, single clicking on the system menu (icon in the upper left-hand corner of the window), pressing alt+space (to activate the system menu) or right clicking on the application button on the task bar.
Active form System Menu:
Application System Menu:
The debug form can also be activated through code:
TBetterSystemDebuggerFrm.CreateWithSystem( nil, TBoldSystem.DefaultSystem ).show;
The menu entries and the code sample above depend on one of the active bold systems having its IsDefault property set to true.
This form and code is a derivative of the code provided by BoldSoft. These changes are almost certainly unfit for end users. You may use them however you like, but please notify me of bug fixes or updates.