Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.241

Navigation: Debugging > Tutorials

Scroll Prev Top Next More

Set a Conditional Breakpoint on the Xth pass

In this tutorial, you will learn:

how to set an execution breakpoint,

apply conditions based on pass count and expressions, and

utilize optional features like displaying message boxes.

 

 

winIDEA checks the condition (Pass count and/or Expression) every time a breakpoint is hit. If the condition evaluates to:

False, the application will immediately run again

True, the execution will remain stopped at the breakpoint, it will count as one more pass.

 

number1

Set a breakpoint.

 

number2

Open Debug / Breakpoints.

 

number3

Check the Enable box in the Condition section.

 

Number4

Set the Pass count and optionally define Expression.

You can display message box when a conditional breakpoint hits.

 

Number5

(optional) Add the Expression to Watches and enable Real time.

You can observe the value changing.

 

number6

Run the application.

winIDEA will show              RUNNING              Debug Status in the bottom right corner.

 

conditional-bp-settings

 

 

More resources

Breakpoints - Video Tutorial

Breakpoint bisecting - Video Tutorial

Breakpoints plugin - Enhanced view for faster manipulation of all the breakpoints in the project

Breakpoint Wizard - Configure the hardware breakpoint either as execution breakpoint or access breakpoint

 

Copyright © 2024 TASKING Germany GmbH