Places a breakpoint in the current code line (alternatively to the SED [F9] breakpoint key). When execution reaches this code position, the application freezes and the
for single stepping through script code. The current
script line is displayed in SED, as well as in the engine
title bar (lite-C) or engine window (C-Script).
the instruction is executed and the next command appears.
By further pressing [F10], the function is executed
line by line and the results of the expressions can be examined. On
the debugger is deactivated and normal function execution will continue
until another or the same breakpoint is reached again.
over function calls (lite-C only).
debugging is terminated for the current session, and all further breakpoints
For debugging the engine must be started with the -debug command line option; otherwise breakpoints are ignored.
The line must contain code; breakpoints can not be placed in empty lines or lines that only contain comments or variable definitions.
- Breakpoints can not be directly placed in shaders, events, and particle functions. However event functions can be
made debuggable by placing a wait(1) before the
Breakpoints are ignored in the runtime
and in legacy mode programs (with a WinMain() function). The //! comment tag can only be set in the main file, not in an include file; [F9] breakpoints in SED however can also be set in include files.
- Material events and particle functions are suspended during
wait() instructions are ignored when single stepping.
- When placing breakpoints into an entity event function, or into
the first part of an entity action before the first wait,
other entities are not updated during debugging and thus may appear
at wrong places.
- To prevent debugging into a certain function, set debug_mode
= 0; at its beginning.
- Variables and objects can be examined by defining watches in SED. For examining variables in the engine window, define a
PANEL with digits.
Debugging is described in detail in the lite-C tutorial.
Conditional breakpoints can be placed by entering an if condition followed by an arbitrary command,
// breakpoint only if [B] is pressed
beep, diag, watched,
debugging, debug_external, debug_mode, wait