更新时间:2022-04-22 03:11:23
有什么方法可以在非原始上设置条件断点类型?
Is there any way I could set a conditional breakpoint on non-primitive types?
是的,一种方法是将非原始类型转换为原始类型,在您的情况下转换为 char*
,然后使用 strcmp
比较字符串.
Yes, one way to do it is to convert non-primitive type to primitive one, in your case to char*
, and use strcmp
to compare strings.
condition 1 strcmp(myObject->myStringVar.c_str(),"foo") == 0