- Open the library project in AX Code
-
Configure the
launch.jsonfile (one-time action)- Click the debug icon
- Click "create launch.json file"
- Adapt the newly opened
launch.jsonfile to your needs (for example IP address, certificate). Add the "symbolsPath" parameter, which must point to your library file.
Example launch.json file
{ "version": "0.2.0", "configurations": [ { "name": "Debug live on PLC", "type": "plc-debug", "request": "launch", "program": "${workspaceFolder}", "ip": "192.168.0.1", "certificate": "C:\\\L44\\\L45\\\L46\ "symbolsPath": "D:\\\L48\\\L49\\\L50\ } ] } -
Add logpoints to your code in the locations you want to look at more closely
- By right-clicking a variable name and selecting "Add to logpoint"
- By right-clicking on the left next to the line number, selecting "Add Logpoint ..." and entering the variable you want to debug in curly braces, for example {myVariable}
The values are always retrieved and shown before executing the line of code in which the logpoint is located.
-
Start debugging by either using the
F5shortcut or pressing the Play button. -
Observe values