Chris’ CodeGear Debugger Blog

Debugger Enhancements since Delphi 7

 [Updated October 5th, 2009:  There is now a "living document" published on this site that will be updated to include new features added in each release of Delphi, C++Builder and RAD Studio.  You can view that page here.]

In the spirit of Nick’s Since Delphi 7 — On Steroids and Steve’s VCL and RTL enhancements since Delphi 7 (D7), I’d like to provide a similar list for Debugger Enhancements (and other changes) which appear in Delphi 2007 that have been added in the various releases since the Delphi 7 release.  This is just a quick, non-exhaustive, bullet list, and does not include any features that do not apply to the Delphi Win32 personality.  It also does not include bug fixes.  If you’d like more details on any of these, feel free to leave a comment and I’ll be happy to expand on a feature in a future blog post.

Breakpoints and Breakpoint List View:

  • Now has a toolbar providing quick access to several functions
  • Breakpoints now have a checkbox, allowing you to quickly enable/disable a breakpoint
  • Disabled breakpoints are now displayed using greyed out text
  • Supports in-place editing of breakpoint Condition, Pass Count, and Group
  • New breakpoint Action: Log call stack allows you to dump a call stack to the Event Log when a breakpoint is encountered
  • You can now ctrl-click in the code editor’s gutter to set a disabled breakpoint.  If a breakpoint already exists on that line, then ctrl-clicking in the gutter will toggle the enabled state of that breakpoint
  • Ctrl-F5 in the editor will now also toggle the enabled state of a breakpoint set on the current line.

Call Stack view:

  • Better, more complete stack traces — stack frames with no debug info are now shown
  • Tighter integration with the Locals view:
    • – can now view locals for a given stack frame using the local menu
    • – double clicking an item now automatically shows that frame’s locals in the Locals view
  • Option on local menu to show Fully Qualified names in call stack
  • Glyphs shown to indicate whether or not a frame has debug info
  • Ability to toggle a breakpoint on the point of return for a given stack frame

Watch view:

Local Variables view:

Thread Status view:

  • Better process control:  Local menu item to Pause the selected process
  • Better process control:  Local menu item to Detach the selected process

Modules View:

  • Name and path of symbol table file is now shown in separate column
  • Module load order now shown in a separate column
  • Ability to sort modules by module name, module path, base address, symbol table name, or load order
  • Modules view now lives in the editor view

Event Log view:

  • New Event log option allows you to specify if the event log should automatically scroll newly-added items into view

CPU view:

  • Full CPU view now lives as an editor tab
  • Individual panes in CPU view can be opened separately as independent dockable views
  • Open up to 4 separate Memory panes to view different locations of memory (or the same location in different display formats)
  • Multi-selection in disassembly pane allows you to highlight and copy to clipboard any contiguous instructions
  • New local menu item in the disassembly pane:  Show Addresses
  • New local menu item in the disassembly pane:  Show Opcodes
  • New local menu item in all panes: Copy
  • New Display formats in Memory pane:  UTF8 and MultiByte
  • Disassembly pane now supports disassembling SSE/PNI instructions

FPU View:

  • FPU view now has a new pane that shows SSE registers
  • FPU view is now a dockable view

Inspector View:

  • Debug Inspectors are now dockable views

Editor View:

Evaluator tooltips:

Run Menu:

  • Run without debugging menu item
  • Load Process menu item provides separate UI for loading an arbitrary process into the debugger (previously,  the Run | Parameters dialog was overlodaded to support this)
  • Detach from Program allows you to end the current debugging session without terminating the application being debugged (supported under XP and later)

Debugger Options:

  • The Debugger options are now part of the Tools | Options dialog rather than a separate Tools | Debugger Options dialog.

Exception handling:

  • The Exception Notification dialog now allows you to decide whether you want the debugger to stop on the exception.  This is implemented via "Break" and "Continue" buttons that appear on the dialog.
  • The Exception Notification dialog now allows you to tell the debugger to ingore a particualr exception type.  This is implemented via an "Ignore this exception type" checkbox that appears on the dialog.
  • The "Stop on Delphi Exceptions" option is now called "Notify on Language exceptions".
  • There is now a toolbar button that can be added to an IDE toolbar that allows you to quickly enabledisable the state of the "Notify on language exceptions" checkbox

Project Options:

  • You can now control the environment block for the debugged process using the Environment Block page in either the Run | Parameters, Project | Options, or Run | Load Process dialogs
  • You can now control the symbol tables loaded for the debugged process using the Symbol Tables page in either the Run | Parameters, Project | Options, or Run | Load Process dialogs
  • You can now control the debug source path for the debugged process using either the Run | Parameters, Project | Options, or Run | Load Process dialogs (this option moved from the Project | Options | Directories/Conditionals page)

Better thread support:

  • When debugging a multi-threaded application, the main IDE Caption will show the thread ID of the current thread being debugged.

Other:

  • All views are unicode enabled, providing the ability to see unicode data in your program
  • Many ToolsAPI enhancements related to debugger support.
Posted by Chris Hesik on April 13th, 2007 under CodeGear Debugger |



12 Responses to “Debugger Enhancements since Delphi 7”

  1. Steve Trefethen Says:

    Great post Chris!

  2. Fernando Madruga Says:

    Very cool list! Just didn’t understand one item, though: "Multi-selection in disassembly pane allows you to highlight and copy to clipboard any contiguous instructions".

    If it’s "multi-selection", why does it have to be "contiguous"?

  3. DanB Says:

    Good to see progress… What’s new since BDS 2006? I realize that D7 is important to many, since that’s where they stayed during the whole .net mess, but I imagine for most of the C++ developers like me, BDS 2006 was a must have upgrade. So, what can I look forward to when C++ 2007 comes out? I’m hoping for:

    1. no more (fewer?) crashes while debugging (seems to happen with long or not terminated char*’s in the watch window or something)

    2. better watch window (if find the VS watch window a lot easier to use… just start typing, no need to pop up a window to insert a watch).

    3. fix shift+f11 hotkey in VS emulation (should step out, pops up some dialog instead)

    4. A "step into specific" feature… I.E., sometimes there’s a lot going on in one line of code, and step into goes into too much (parameter creation, etc…). It would be nice to be able to step into a specific function directly, again, see VS for an example of what I mean.

    How come the C++ team doesn’t seem to blog regularly?

  4. C Johnson Says:

    These are all significant improvements. I would like to see a feature of VS join the delphi debugger still tho.

    Any chance we could get debug data visualizers in the next version? Basically let us create custom plugins to view datatypes. It would be handy to see bitmaps as bitmaps, jpegs as jpegs, CustomXXX as CustomXXX instead of just a pile of bits in an array with a few properties scattered around it.

  5. ahmoy law Says:

    Implementing debug data visualizers into delphi? that sounds very good as long as the steps needed to write a custom plugin into debugger is a straight forward process.

  6. Chris Hesik Says:

    Fernando,

    There are a couple of reasons that multi-selection in the Disassembly pane only works on "contiguous" instructions.

    The first, and most important, is that the 2 most common use-cases for multi-selection only required contiguous selection: 1) allow you to copy a set of instructions to the clipboard so that they can later be pasted into code as inline assembly and hank-tweaked and 2) allow you to copy some instructions so they can later be pasted into into a newsgroup posting, blog post, or bug tracking tool (i.e. QC). In both cases, you only need to copy a contiguous block of instructions.

    The second reason was ease of implementation — at the time multi-selection was added, given the source code for the disassembly pane, it was much easier to add multi-selection if it was limited to contiguous instructions. In light of the first reason given above, it seemed natural to limit it in this way.

    If you have a compelling use case that requires non-contiguous multi-selection in the disassembly pane, please file a QC report describing the situation and then let me know the QC report number.

    Thanks,

    Chris

  7. DANILO ZANAGA Says:

    Chris,

    What about a better exception handling? I’ve seen Eurekalog and i think its amazing (call stack log with line number its best). Our company made a ‘Template’ just to add a try..try…except…finally on each method to log beginning/ending/error of it. This approach is good, but an automatic EH would be better.

    Best regards,

    Danilo Zanaga

  8. Daniel Says:

    Hi Chris,

    Quick remember… :-) It would be nice to have specialized inspectors for C++ STL containers… Talk to Bruneau on this one, he used to propose something like that for CBuilderX.

    Best Regards,

    Daniel

  9. Brad White Says:

    > "Set Next Statement" menu item in the editor.

    I’m not clear on what this means.

  10. wesson Says:

    Debugger is probably a little bit better, but far from perfect: It still freeze the system to death from time to time when it comes to debug multithreaded applications, and the remote debugger is still crashing very often and cause the IDE to crash with assertion failures as well. It is often impossible to start a exe on a remote machine, and required to attach to the started application instead.

  11. Chris Hesik Says:

    Brad,

    I’ve just written a new post describing what I meant by "’Set Next Statement’ menu item in the editor".

    Chris

  12. Chris’ CodeGear Debugger Blog » Debugger Enhancements since Delphi 7/C++Builder 6 Says:

    [...] in April of 2007, I wrote a post listing all the debugger features that have been added to Delphi and C++Builder since the Delphi 7 release.  While it was up to date at the time (the 2007 release), it has not been kept up to date with [...]

Leave a Comment



Server Response from: blog2.codegear.com