How to use Conditional Breakpoints in DVT IDE for VS Code
Overview
In DVT IDE you can efficiently perform interactive debugging, for example during the UVM Runtime Elaboration. This video demonstrates how to suspend execution in a breakpoint only when specific conditions are met.
This video was shot using version 24.2.28 of the DVT IDE for VS Code.
Details
Introduction
In DVT you can quickly add a breakpoint by double-clicking on the editor vertical bar. Execution is suspended whenever it reaches the corresponding line of code, for example during the UVM Runtime Elaboration, allowing you to perform further interactive debugging.
Using Conditional Breakpoints
Sometimes it is helpful to suspend execution only when a specific condition is met.
- Right-click on the breakpoint and select Edit Breakpoint… from the context menu.
- Fill the expression in the textbox. Content assist is available, just press
- Press Enter when done.
- Press Continue to resume execution.
Ctrl-Space
to see the proposals. You can type any expression that evaluates to true or false according to the SystemVerilog LRM semantics. In the expression, you can use any variable or function visible at this point in code.
Notice that execution now suspends only when the breakpoint condition is true.
Changing the Condition via the Command Palette
Conditional breakpoints can also be configured from the command palette.- Let's select the line where the previous breakpoint was created.
- From the command palette run the Debug: Add Conditional Breakpoint.. command.
- Change the condition.
- Press Enter to save the changes and click on Continue to resume execution.