since version 1.12.3
The macro debug
can be used to start the debugger from the Jamal source code.
It is an extra way to start the debugger in case setting an environment variable or system variable would be too difficult.
The macro has the following syntax:
{@debug on/off using="..."}
It is important to note, it will only work if the debugger is on the module path or on the classpath.
It is also important to note that the macro only works if there is no debugger configured in the environment variables, or in the system properties or configured in the .jamal
directory.
If there is already a debugger configured, then the macro will result in error unless the option lenient
is set.
The macro has the following options:
-
using
(aliasesdebugger
,selector
) can specify the debugger connection string. This is the same connection string that you can use in the environment variableJAMAL_DEBUG
or system property.You can switch off and on the debugger inside the input using the options
on
andoff
. -
on
the debugger is switched on. -
off
the debugger is switched off.You cannot use the
on
andoff
options together. Doing so will result in an error.The options
on
,off
, andusing
are technically all aliases, which means that a user defined macro or option of the same name does not affect the macro. -
noDebug
is an option that can be used via theoptions
macro to switch the debugger off globally for the whole file, or for the part where the option is in effect. It is possible to use this option as a parameter to the macro, however, in this case the effect is the same as the parameteroff
. -
lenient
is an option that can be used via theoptions
macro. When this option is on, the fact that a global and external debugger is defined will not result in an error.