Breakpoint with Condition

4.2k Views Asked by At

Is there a way how to set up more complex condition for breakpoints in QtCreator? (dbg) At least comparing the QStrings, but other complex type would be nice too. Integer comparing like in tutorials works fine.

2

There are 2 best solutions below

4
jpo38 On BEST ANSWER

Right click the breakpoint (red ball in the left hand side of the text editor) and select something like "Edit breakpoint". A dialog then let you put conditions on the breakpoint.

enter image description here

1
Ashkan On

ctrl+click or right click a breakpoint and choose Edit Breakpoint.

A window comes up where you can set "Condition" and how many times it should be ignored before the debugger stops the execution.

The condition can be whatever you would write in a conditional c++ clause.

There are other options as well such as which thread are you targeting.