【发布时间】:2018-06-18 16:07:26
【问题描述】:
这是我多年来不时尝试的事情,但从未完全成功。我只想根据字符串相等性为 Visual C++ 2012 设置条件断点。我要测试的变量是
string test;
我试过了
test == "foo"
=> The breakpoint cannot be set. no operator "==" matches these operands
test == string("foo")
=> The breakpoint cannot be set. no operator "==" matches these operands
test.compare("foo") == 0
=> The breakpoint cannot be set. This expression has side effects and will not be evaluated.
strcmp(test.c_str(), "foo") == 0
=> The breakpoint cannot be set. This expression has side effects and will not be evaluated.
【问题讨论】:
标签: c++ visual-studio-2012 breakpoints string-comparison conditional-breakpoint