C++ Eclipse-当结构成员达到某个值时,在调试期间中断

C++ Eclipse-当结构成员达到某个值时,在调试期间中断,c++,c,eclipse,debugging,C++,C,Eclipse,Debugging,我在这方面也看到过类似的问题,但没有找到我问题的答案。我将使用下面的示例代码: #include <stdio.h> #include <stdlib.h> typedef struct _test { int x; int y; } test; test t1; int thread1 () { int i, j, k; i = 0; // i want to break here IF t1.x == 10 retur

我在这方面也看到过类似的问题,但没有找到我问题的答案。我将使用下面的示例代码:

#include <stdio.h>
#include <stdlib.h>

typedef struct _test {
    int x;
    int y;
} test;

test t1;

int thread1 () {

    int i, j, k;
    i = 0; // i want to break here IF t1.x == 10

    return EXIT_SUCCESS;
}
但是,即使达到了10的值,它也没有中断

首先,这可能吗?其次,这是正确的方法吗


谢谢

尝试将
t1
声明为
volatile test t1这与Eclipse有什么关系?人们问他是否可以调试他的程序。这与代码有什么关系?我看不出eclipse有任何理由不停止那里的程序。你试过调试另一个简单的程序吗?
t1.x == 10