Skip to content
David Hoyle edited this page Jan 4, 2022 · 6 revisions

Overview

The is a RAD Studio IDE plug-in that contains a small collection of useful debugging tools for the RAD Studio IDE. It provides keyboard access to add a breakpoint and display the breakpoint editor dialogue. This tool also incorporates the Debug with CodeSite functionality which allows you to add an identifier/expression in the code editor as a breakpoint containing a CodeSite.Send() evaluation expression which then sends a message via CodeSite during debugging.

This is a useful technique for debugging code you cannot or should not alter like the RTL/VCL. The idea behind this comes from my post Debugging RTL/VCL Code with CodeSite and Stefan Glienke asking if it could be done through an OTA plug-in.

Options

There are a few options for the plug-in as shown below.

These options are as follows:

  • A message temple that should contain a least 1 %s to be replaced. Each occurrence of %s will be replaced with the identifier.
  • Check that CodeSiteLogging is in the DPR/DPK unit list;
  • Check that the project has Debugging DCUs checked;
  • Check that CodeSite path is in the library (this is current unimplemented due to issues getting the information from the IDE);
  • Log the Result of the CodeSite breakpoint to the event log;
  • Break at the CodeSite breakpoint;
  • Edit the breakpoint after it's added.

Usage

For the breakpoint functionality, these have been implemented using keybindings in the editor so there is no corresponding action or menu item in the IDE. This means that the editor needs to have the focus for them to work. The keybindings are as follows:

  • Ctrl+Shift+F8 - Adds a breakpoint and displays the breakpoint editor;
  • Ctrl+Shift+F7 - Adds a CodeSite breakpoint (see below).

For the CodeSite breakpoint, the usage is hopefully simple. You can either place the cursor over an identifier and that identifier (including any simple qualification) will be added to the breakpoint or you can select some text/expression and that will be added to the breakpoint.

As you should be able to see above the selected identifier is added to both the CodeSite.Send() label and the variable as the template contained 2 %s (default).

Clone this wiki locally