Debugging

This chapter explains how to debug your Axon Ivy processes. There are two things you can debug

  1. The Axon Ivy process itself. Inspect your process elements when simulating to understand the process.

  2. The Axon Ivy engine and the Java classes that are executed during your process. This means your own Java files as well as stepping into the engine code.

Process Debug

  • In your open process, add a breakpoint on a process element

  • There should pop up a notification in the bottom-left corner, telling you that you have no running debug session. Press Start Process Debug to start a session.

  • If no notification appears, start a debug session with the command Axon Ivy: Attach Process Debugger

  • After starting the session, the Run and Debug View should indicate that you have a new debug session running. You should also see the debug toolbar.

  • Start your process simulation. The simulation should stop at the breakpoint and you can inspect the variables in the Run and Debug View.

../_images/debug-view.png

Java Debug

  • Set a breakpoint somewhere in a Java file as described here Setting a breakpoint

  • Update the Vm Args setting with the string

    -agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n

  • Restart the extension, so that the settings can take effect by running Developer: Reload Window

  • Create a new launch.json configuration as described here: Create a debug configuration file

  • Select Java

  • Then add a java launch configuration to your .vscode/launch.json file.

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Debug Axon Ivy Dev Engine",
            "request": "attach",
            "hostName": "localhost",
            "port": "8000"
        }
    ]
}

Starting your process simulation should now stop at the breakpoint and let you inspect your Java classes.