Quote: The following breakpoint cannot be set: At file.cc, line 71 ('File( std::string path )', line 4), when 'path=="levels/test.xml"' is true Unable to evaluate the breakpoint condition: CXX0058: Error: overloaded operator not foundWhich seems strange, std::string has that operator. What am I doing wrong?
Conditional breakpoints with std::string
Im trying to see why a file cant be loaded, but the others can so now Im trying to setup a conditional breakpoint.
This is with Visual Studio 2005, Ive set a breakpoint and in breakpoints window (alt+f9) I rightclick and set condition to: path=="levels/test.xml"
But when starting the program I get this message:
please post your code. It's difficult to troubleshoot what is going on with just that.
cheers,
Bob
cheers,
Bob
The simplest solution is to modify the code. If you want to break every time use:
if (path=="levels/test.xml")
DebugBreak();
If not replace the call with some other statement you can put a breakpoint on.
I've found that the debugger isn't always very good at evaluating operators, or reporting useful errors when you get the syntax slightly wrong.
if (path=="levels/test.xml")
DebugBreak();
If not replace the call with some other statement you can put a breakpoint on.
I've found that the debugger isn't always very good at evaluating operators, or reporting useful errors when you get the syntax slightly wrong.
You can do this,
bool b = path=="levels/test.xml";
then set the conditional break point when b is true (you might just need to enter b, if there's a radio button that selected "Is true" already there).
bool b = path=="levels/test.xml";
then set the conditional break point when b is true (you might just need to enter b, if there's a radio button that selected "Is true" already there).
Yes, adding some code to do the same thing is of course the easiest way to go. I was just wondering if this could be done without a recompile. :)
Actually, this hasnt anything to do with my code.
Quote:Original post by Scourage
please post your code. It's difficult to troubleshoot what is going on with just that.
Actually, this hasnt anything to do with my code.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement