What does Visual studio debugger do, when condition should give error
Posted
by
zacharmarz
on Programmers
See other posts from Programmers
or by zacharmarz
Published on 2012-06-12T13:51:50Z
Indexed on
2012/06/12
16:48 UTC
Read the original article
Hit count: 258
I'm debugging some code and I need to break everytime, when character in string (const char *) is equal to something.
So I put there breakpoint and attach condition like: s[0] == 'e'
. But code I'm debugging is in CRT and there is possibility, that s == 0
is true. So "addressing empty pointer" should give some kind of error. Yes - I could give there condition s != 0
, but it would not be such fun :)
And I'm curious, what will debugger do when trying to evaluate this condition? How it will behave internally? Obviously it's not giving any error nor stopping on this breakpoint when s == 0
Thanks for your answer.
© Programmers or respective owner