THIS SOFTWARE AND MANUAL ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANT ABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.
The Zeus D Debugger is an interface for the DDBG - Win32 D Debugger debugger an it provides an integrated debugging environment for the Zeus for Windows IDE
To use the Zeus D Debugger module you will need to download and install the latest version of the DDBG debugger found here:
The DDBG - Win32 D Debugger installation is as simple as unzipping the zip file.
The simplest install option is to unzip the files into the Zeus installation directory, but the files can be placed in any directory provided that location is defined in the system PATH environment variable.
Any executable created with the D Language compiler and compiled with debug information can be used.
For the sake of this tutorial the debugee.exe and debugee.d files provided as part of the DDBG - Win32 D Debugger installation will be used.
Assume these two files are copied to the following folder location:
C:\d\example>dir Volume in drive C has no label. Volume Serial Number is 1332-15E1 Directory of C:\d\example 06/03/2007 12:25 . 06/03/2007 12:25 .. 02/03/2007 11:54 3,478 debuggee.d 02/03/2007 11:07 203,040 debuggee.exe 2 File(s) 206,518 bytes 2 Dir(s) 966,983,680 bytes free
To debug the
debuggee.exe using the Zeus for Windows editor requires the creation of a Zeus workspace.
To create a workspace use the
Workspace, New  menu and create a
Debuggee  in the
c:\d\example  folder location.
Source Files  folder of the workspace and use the mouse right click to add the
c:\d\example\debuggee.d  file to the folder.
Workspace, Options  menu and change the
Configuration  option to
Go to the
Debugging  section and select the
Executable  program type, enter
debuggee.exe  as the executable, add
some input string  as the arguments, add
as the directory, select the
D Debugger Interface  as the debugger module and
Apply  the changes.
$WDD  setting assume that the debug executable is located in the same directory as the Zeus workspace file.
With the workspace created it is now time to start debugging. Use the
Debugger, Start  menu to run the debugger.
If all went well the following output should have been produced in the debugger output window:
Module:'Debuggee.exe' Directory:'D:\d\example\' Command Line:'ddbg.exe Debuggee.exe some input string' ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded
c:\d\example\debuggee.d  into the
Zeus for Windows editor and place
the cursor at
Use the debugger dialog
Set  button to add a breakpoint at this line and you shoudl see the breakpoint indicator displayed for that line.
Run  button to start debugging the program and if all goes well
the progam should stop ar the breakpoint and the following output debug output is displayed:
Breakpoint set: debuggee.d:132 0x402207 ->r Breakpoint 0 hit debuggee.d:132 0x402207 if ( _D4argsAAa.length > 1 ) ->
From this point on you can control the debugger using the debugger dialog. You can step over or through the code, examine the call stack, inspect local or global variables or run any other debugger commands.
For more information about
other debugger commands just press the
A screenshot of the debug session described above can be found here: http://www.zeusedit.com/lookdebug.png
Copyright (c) 1996-2007 Xidicone P/L. All rights reserved.
6th March 2007
by Jussi Jumppanen