In the following minimal code
#include <iostream>
class MyClass{
public:
bool x;
void MyFunction();
};
void MyClass::MyFunction(void){
std::cout << "You just called MyFunction\n";
}
int main(int argc, const char * argv[]) {
MyClass my_class;
my_class.MyFunction();
return 0;
}
I would like, in XCode, to stop the code with a breakpoint or watchpoint whenever the variable x of MyClass equals true. I have tried with watchpoints and symbolic breakpoints, but nothing works.
Do you know how to do this? Thanks!