After one day's struggling, I found it is file encoding problem, in my file, it has chinese characters, I convert the file format to GB2312,so the breakpont works normally again.
bug of visual studio 2022
hitbuyi
46
Reputation points
in debug mode, the runing cursor step into the unreachable code
int fun() {
static int mycnt = 0;
if(mycnt == 6) {
printf("%d",mycnt); // line 1
}
}
when mycnt ==1, in debug step into mode, the cursor run into line 1, but printf nothing, I guess this line of code is not acutually executed,but the executing cursor pontint to wrong place
I used vistual studio 2015 for more than 5 years, this kind of bug never happend, maybe this is bug of visual studio 2022