# Data breakpoint in VC++ 6

## Recommended Posts

Can someone provide me with a complete example on how to set a data breakpoint in VC++ 6? I think I do it exactly as msdn states but it never works (I get an invalid breakpoint message). I think 've tried everything now without succes :/

##### Share on other sites
...and suddenly the breakpoint wasn't invalid for no reason... but it still didn't stop when the condition was set.

##### Share on other sites
Are you remembering to use a C/C++ style expression. e.g.,
foo == 5

The breakpoint should break when the expression is true.

##### Share on other sites
That is exactly what I do and according to msdn it should be enough to put an expression like that into the expression field in the data tab for the breakpoint. But then it says invalid breakpoint and stops the debugging. If I add the function and the exe then it starts debugging but nothing happens when the statment is true...