Original Post
🔒 Locked
[debug] breakpoints
Advertisement
quote:
Original post by foofightr
I heard this was possible but I can''t find out how. With MSVC++ 6, how do you set a breakpoint that''s dependant on a variable? For example, if you want it to break when "myInteger" is over 50?
if( myVariable > 50 )
int iBreak = 0;
put a breakpoint on the "int iBreak" line.
Right click on the break point in the Breakpoints window. Go to Properties, then Condition. Write the condition there.
But yes, it is slow, since the debugger has to evaluate the expression every time the breakpointed statement is executed.
"I would defend the liberty of concenting adult creationists to practice whatever intellectual perversions they like in the privacy of their own homes; but it is also necessary to protect the young and innocent."
Arthur C Clarke
But yes, it is slow, since the debugger has to evaluate the expression every time the breakpointed statement is executed.
"I would defend the liberty of concenting adult creationists to practice whatever intellectual perversions they like in the privacy of their own homes; but it is also necessary to protect the young and innocent."
Arthur C Clarke
If you have the default keys set up:
Set a breakpoint (F9)
press alt-F9.
Select your break point in the list box.
Press the "Condition" button.
type: myInteger > 50
If you want to set a memory break point, press the data tab, and type in the memory address in the space labeled:
"Enter the expression to be evaluated:"
Do not set a very large number in the "number of elements" box or you app may chug.
Set a breakpoint (F9)
press alt-F9.
Select your break point in the list box.
Press the "Condition" button.
type: myInteger > 50
If you want to set a memory break point, press the data tab, and type in the memory address in the space labeled:
"Enter the expression to be evaluated:"
Do not set a very large number in the "number of elements" box or you app may chug.
Hey thanks for the advice all, and yes you are right it''s ungodly slow when you do this... to give you an example, when run at full speed the actual condition is reached about 1/500th of a second after the program (main loop) starts, but when I entered the conditional breakpoint it took at least 3 seconds for it to break. Granted these are under extreme conditions (hardware emulation code) where the condition is checked constantly (v-blank status), but it''s still funny
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement