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

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,263 questions
{count} votes

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.

    0 comments No comments

Your answer

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