比如 int i = 1; if (i != 1 ) return ; 怎么不断的检测这个变量 i 的值 与 监视前的值 是否变化 最弱智的方法就是写个循环 加个sleep 可是这样太占CPU了 我想用阻塞的方法监视, 比如 我用普通的语句 赋值变量 i = 2; 那么监视这个变量的函数会立即返回...
To set a breakpoint when a variable changes value
From the Edit menu, click Breakpoints.
Click the Data tab of the Breakpoints dialog box.
In the Expression text box, type the name of the variable.
Click OK to set the breakpoint.