Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Version: 6.1.0

Hot to debug Code actions?

If you want to launch the debugger and use breakpoints, you need to perform a few preparatory steps.

First, you need to run WorkflowServer in your IDE in debug mode. Next, you should enable debugging during the initialization of WorkflowRuntime:

WorkflowRuntime.CodeActionsDebugMode = true;

Or you can set a configuration parameter in the config.json file:

{
// ...
"DebugMode": true
// ...
}

Then, you can set a breakpoint right in the code of CodeAction by writing /*break*/ (commentary brackets do matter).

Debug actions

It is rather convenient because if debugging is disabled, a breakpoint will transform into an ordinary comment. At the same time, if debugging is enabled, a breakpoint will turn into the following code:

if (System.Diagnostics.Debugger.IsAttached) {
System.Diagnostics.Debugger.Break();
}

That's it! Now, when your Code Actions are executed, the program will stop at your breakpoints in the IDE.

Debug in IDE