RAD Debugger

Find Tips and tricks on how to better use the Zeus IDE. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Post Reply
jussij
Site Admin
Posts: 2661
Joined: Fri Aug 13, 2004 5:10 pm

RAD Debugger

Post by jussij »

Installation

On Windows there is an alternative to the Microsoft debugger called the RAD Debugger .

In fact, this debugger also works on Linux. To use this debugger on Linux, clone the repo and build the executable as per the build instructions found in that repo page.

Windows users can download a pre-built binary from the releases page.

Download the raddbg.zip file and unzip the file into a suitable folder location.

Make sure that folder location is also located in the Windows PATH environment variable.

To test this, open a command line prompt and run this command:

Code: Select all

raddbg.exe -?
If the executable installation folder is located in the system PATH that command should result in the display of the debugger options dialog.

If instead this command results in an error, make sure the PATH has been correctly configured.

For more details on how to do this refer to this link.

Using the Debugger with Zeus

To use the debugger, you first need to create a Zeus Workspace.

Zeus can import Microsoft project and solution files, which is one way to create Zeus workspace.

But you can also create a workspace from a folder location.

For details of both refer to the Zeus Workspace menu.

With a Zeus workspace created, use the following instructions to configure that workspace to run the RAD Debugger .

1. Configuring the Workspace
With the workspace open use the Workspace, Debugger Options menu to bring up the debugger options.

NOTE: Zeus workspaces can contain multiple projects, and for this reason you need to ensure you set the debug options for the project that represent the executable file.

In this example the Zeus project represents the executable, so it needs to be the project select on the left.

With the executable project selected enter in the following options:

Code: Select all

Program Type: Executable
  Executable: raddbg.exe
   Arguments: --project:"$wdd\$wb.rdbg"
   Directory: $pdd

   [ ] Capture standard error
   [ ] Capture standard output
   
Debugger Configuration: Select <External Debugger>
NOTE: The $pdd represents a Zeus macro that evaluates to the project drive and directory of the currently active project.

The $wdd\$wb.rdbg is a set of Zeus macros that evaluates to name and location of the RAD Debugger configuration file.

This string will evaluate to a full file name constructed from the workspace folder location, the base portion of the workspace file name, and the .rdbg file extension.

With these options in place the settings should look similar to the debugger options shown below:
zeus-debug.png
zeus-debug.png (147.07 KiB) Viewed 340 times
Note that the blue rectangle on the left represents the executable project, and the blue rectangle at the top represents the workspace debugger options panel.

2. Running the Debugger
With the workspace open make sure the executable project is set as the action project.

Do this by right clicking on the project and make it the active project using the popup menu shown below:
zeus-set-active.png
zeus-set-active.png (106.72 KiB) Viewed 340 times
With the active project set you can now start the debugger using Workspace, Debugger, Start menu.

This will start the RAD Debugger using the configuration details described above.

Before the debugger can be used, you will need to add the debug executable as a target, and this is done by dragging and dropping the debug executable onto the debugger.

NOTE: This step only needs to be done once as the RAD Debugger will save this information in the .rdbg configuration file configured earlier.

On any subsequent launch these target details will be remembered as shown below:
zeus-target.png
zeus-target.png (77.51 KiB) Viewed 340 times
3. Running the Debugger via a Keypress
The Zeus debugger, start menu maps to the following Zeus function:

Code: Select all

DebuggerStart
Use the Options, Editor Options menu, and in the Keyboard Mapping section, edit the currently active keyboard and bind that DebuggerStart function to any suitable key combination.

This will allow the debugger to be started using that keyboard key combination.
jussij
Site Admin
Posts: 2661
Joined: Fri Aug 13, 2004 5:10 pm

Re: RAD Debugger

Post by jussij »

The RAD Debugger can also be used to debug D executables.

Just use the ldmd compiler and remember to add the debug command line options:

Code: Select all

ldmd2 -g -gf
Post Reply