Cicode Programming Reference > Cicode Function Categories > Miscellaneous Functions Introduction > DebugBreak

DebugBreak

Causes a breakpoint exception error to occur (error number 342). This allows programmers to trap invalid states in their Cicode. If the Cicode Editor is not running, and the Citect will start debugger on hardware errors option is set (Debug menu - Options), the Debugger will be started. When the debugger starts, the correct Cicode file, function, and line will be displayed.

Syntax

DebugBreak()

Return Value

None.

Related Functions

DspKernel, KerCmd, DumpKernel, TraceMsg

Example

!Check to see that rSpan is greater than zero else cause a break. 
If rSpan equals 0 it would cause a Divide by Zero hardware error 
anyway.
IF rSpan > 0 THEN
rCalcRate = iAmount/rSpan;
ELSE
DebugBreak();
END

See Also

Miscellaneous Functions