In the Workspace setting there is a Debugger page. While that page integrates to the gdb.exe debugger, I does not need to be used and I would recommend not using this feature, only because gdb does not work well on Windows, and only works for certain compilers.
Setting up Workspace
Consider a very simple example on how to setup a Zeus workspace.
I have a single
MyProgram.c file as shown below:
Code: Select all
#include <stdio.h>
int main(int argc, char *argv[]) {
puts("Hello, World");
for (int i = 0; i < argc; ++i) {
puts(argv[i]);
}
return 0;
}
I use the
Workspace, Open Folder menu option to create a workspace for that file, by opening the folder location of the file.
NOTE: Obviously the other Workspace create methods can also be used. In this case the
Workspace, Open Folder option was used as it is by far the easiest method to create a workspace.
Here is the workspace created using this menu. Notice that the name of the folder, which in this case was the folder
C, is used to name of the project and the workspace.

- zdb1.png (214.79 KiB) Viewed 11073 times
Setting up the Compiler
Now if I edit the workspace Compiler settings I can add a command to compile a single file in that workspace.
In this case I use the following C compiler command line to compile a C file as shown below:
NOTE: Naturally this command line will need to be modified to compile a single file for the compiler that you are using.
The completed setup for the compiler is shown below:

- zdb2.png (120.63 KiB) Viewed 11072 times
Notice how the file is represented by the "$fn" tag.
You can use any Zeus tag in that command line and if you run the
ztag.lua macro using the
Macros, Execute Script menu, it will show Zeus tags and their equivalent values.
To see the details of that macro place the cursor on the file name below and use the
View, Open File menu to open the file:
Also notices that the compiler has been configured to only show output on warnings and errors. This can be changes to suit.
Setting up the Project
In the Project panel you add the commands to build the whole project. There are also options to clean and rebuild the project.
Generally you would use some sort of build tool for this command line.
In my case as this is a single file project, I can get away with this very simple C command line that will create an executable from a single file as shown below:
NOTE: Naturally this command line will need to be modified to produce an executable for the build tools that you are using.
Here is the complete Project setup.

- zdb3.png (132.1 KiB) Viewed 11072 times
Setting up the Debugging
In the Debugger panel you add a command line to run the resulting exactable.
Now in my case the Project build creates the following executable:
So all I need to do is add that executable to the Debugger panel as shown below.

- zdb4.png (93.58 KiB) Viewed 11071 times
Notice that I also added some command line parameters and I capture the output produced.
I also use the
$wdd macro tag to set the directory to match the workspace drive and directory.
Also notice that these are Debug settings as specified by the blue rectangle found in the top left corner.
There are a second set of configuration options for Release mode, allowing for special release builds if required.
Running these Commands
With all of the settings in place I can now access these command lines as follows.
- The Compiler, Compile menu can be used to run the Workspace Compile command line for the currently active file.
- The Workspace, Build menu has options for Make, Clean and Rebuild that run the correspond Workspace Project command lines.
- The Workspace, Build menu has the Start Debug Executable and Start Release Executable which run the corresponding Workspace Debugger command lines.
For my example, if I use the
Workspace, Build, Start Debug Executable menu the executable is run, and the following output is capture:

- zdb5.png (185.16 KiB) Viewed 11068 times
Running these Commands Using the Keyboard
All of these menus can also be bound to a keyboard key to make them easier to use.
The easiest way to do this is as follows:
- Record a macro
- Select the menu in question
- Finish recording the menu
- Viewing the macro source code produced
That macro source will contain the name of the function that is run by the menu selected and that function name can then be bound to a key using
Options, Editor Options menu,
Keyboard Mapping panel.
Cheers Jussi