Skip to content

Using the Debugger

Instead of running the code, you can place breakpoints and debug the Vault extension class line by line.

  1. If the debugger is still running, click Stop in IntelliJ® to turn off the debugger.
  2. Instead of Run, click Debug.
  3. Add a breakpoint to Line 20.
    Adding breakpoints in IntelliJ.Adding breakpoints in IntelliJ.
  4. In Vault, navigate to the vSDK Hello World object and click Create. You should see the code execution is transferred from the server to your code locally in IntelliJ®.
  5. In IntelliJ®, click the Step Over button from the debug window to move through code execution one line at a time.
    Using Step Over in the IntelliJ debugger.Using Step Over in the IntelliJ debugger.
  6. Notice the event variable is assigned a value of BEFORE_INSERT. The code will now step through the BEFORE_INSERT section of code logic.
    The event variable in the IntelliJ debugger.The event variable in the IntelliJ debugger.
  7. Click Resume Program.
    Resuming program execution in IntelliJ.Resuming program execution in IntelliJ.
  8. Code execution will pause at Line 20 again. Click Step Over.
  9. Notice the event variable is now assigned a value of AFTER_INSERT. The code will now step through the AFTER_INSERT section of code logic.
  10. Click Resume Program again to complete code execution.
  11. Back in Vault, verify that the vSDK Hello World record is created with the description field set to "Hello, {name}!"
  12. Verify that a vSDK Hello World Child record is created with the same name as the parent record, and that the Hello World field is set to the parent record.
  13. When you are finished, click Stop to turn off the debugger.