The debugger allows you to control the execution of your script by setting breakpoints, suspending launched scripts, stepping through your code, and examining the contents of variables.
The debugger can be invoked:
Note: The recommend method for debugging is to attach the debugger to an existing session.
Debugger features are available in Debug perspective. This perspective is opened
when a debug session is started. If Debug perspective does not open, you can do it manually :
open Window / Open Perspective / Debug Menu.
If not present, open Window / Open Perspective / Other... Menu and select Debug in perspectives list.
You can also make Debug perspective open automatically by setting
'Open the associated perspective when launching' option to 'Always' or 'Prompt' in
'Run/Debug / Perspectives > Preferences'
You can use this way of debugging scripts when you want to launch your script directly from Safe X3 Studio. To make it work, an X3 Client matching the script project (same machine, port and folder) must be running in front of your Safe X3 Studio. If no X3 Client is already launched (or if there is one but in a busy state), a corresponding one will be launched.
Note : in order to be sure that this debugging way is efficient, it is necessary to have checked Server polling in X3 client options, like in screen-copy below.

This is the common way to debug script. Just put a Dbgaff statement in the script you want to debug, and go to X3 client to launch X3 function corresponding to your script. As Dbgaff statement is reached, a debug session is launched in Safe X3 Studio allowing you to start debugging your script.
However, the recommend method to debug is to attach to a process like describe below.
Attaching processes allows you to debug scripts running on another machine than yours, or specific scripts like batch scripts for example.
To attach a process, click on [
] button to make processes list bring up.
Then select the process you want to debug, and click Attach button.
If the process does not belongs to you, a message-box will be displayed to ensure that you really want to debug this process.

