Debug in VS Code
To find out more, take a look at how debugging works in VS Code in general: https://code.visualstudio.com/docs/debugtest/debugging
There is also a chapter dedicated to Java: https://code.visualstudio.com/docs/java/java-debugging.
Debug IvyProcess and IvyTest Junit Tests
- Simply add a breakpoint wherever you want the test to stop.
- Then debug the test:

You can find out more about VS Code and testing here:
https://code.visualstudio.com/docs/java/java-testing
Debug Java while running Business Processes
You need to enable Java debugging on the development engine. Simply uncomment or add the following line to the configuration/jvm.options file:
-agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n
You find the location of your development engine on the OUTPUT view under Axon Ivy Engine:
Go to the Run and Debug view and press create a launch.json file or create a file under .vsocde/launch.json in your workspace.

You need to set up a Java debug attachment configuration to port 8000 in the launch.json file:
{
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug Axon Ivy Dev Engine",
"request": "attach",
"hostName": "localhost",
"port": "8000"
}
]
}
Restart VS Code using the Reload Window command. The Engine should then print out to say that it is listening on port 8000.

You can now start the debug session either in the 'Run and Debug' view or by pressing the 'F11' key:

Pro Tip
Use the debug.toolBarLocation setting to control the location of the Debug toolbar. It can be the default floating, docked to the Run and Debug view, commandCenter or hidden. Personally, I like the commandCenter the most.