How to use breakpoint hit counts and trigger points in DVT IDE for VS Code
Overview
This video demonstrates two advanced interactive debugging techniques you can use in DVT IDE: suspending execution only after encountering a breakpoint a specific number of times and dynamically enabling breakpoints only after execution has reached a specific point.
This video was made using DVT 25.1.10.
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 hit counts
Sometimes it is helpful to suspend execution only after encountering a breakpoint a specific number of times.
- Right-click on the breakpoint and select Breakpoint Properties… from the context menu.
- Check the Hit count box.
- Enter the number of times the breakpoint should be hit before actually suspending the execution.
- Press OK when done.
- Click the Resume button to continue execution.
After being hit twice and suspending the execution, the breakpoint stays disabled either until it is explicitly re-enabled or its hit count is modified.
Using trigger points
Trigger points are another useful way to dynamically enable breakpoints only after execution has reached a specific point.
- Right-click on the breakpoint and select Breakpoint Properties… from the context menu.
- Check the Trigger point box.
- Press Apply and Close.
When setting triggerpoints, all other breakpoints are suppressed until any of the triggerpoints is hit.
After the first trigger point is hit, execution stops, all triggerpoints get automatically disabled and breakpoints get re-activated. After we press resume, the breakpoint - which was suppressed until now - does suspend execution.