Share via

bug of visual studio 2022

hitbuyi 46 Reputation points
2023-04-04T08:36:38.4433333+00:00

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

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.


1 answer

Sort by: Most helpful
  1. hitbuyi 46 Reputation points
    2023-04-05T15:18:16.5766667+00:00

    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.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.