How to configure the entry main file in VS2022
Problem: F11 cannot enter the main.cpp of the project, but exe_main.cpp under VS2022.
Process: One time during debugging, for some unknown reason, I couldn't hit the breakpoint in Debug mode. When pressing F11, it prompted me to choose one exe_main.cpp. I wasn't sure whether to choose the main.cpp of the project or the exe_main.cpp under VS2022. Judging from the name, the latter seemed more in line with the conditions, so I chose exe_main.cpp
When I press F11, it will enter the exe_main.cpp mentioned just now
Then when I press F5, the software starts, but it cannot enter the breakpoint of my program, and the color and style of the breakpoint are also abnormal. The following is the breakpoint in MainWindow.cpp
The prompt content is: The breakpoint will not be hit currently. No symbols have been loaded for this document.
My project is generated through CMakeLists. After creating the project, I haven't modified the pdb-related configuration, and previously these configurations worked by default.
I restarted the computer, deleted the configuration folder of VS2022: %appdata%\Microsoft\VisualStudio\17.0_4979ebb8.
Then I deleted the build folder in the project and recreated it.
mkdir build
cd build
conan install ..
conan build .. -c
Then I opened VS2022, pressed F11 to enter the debugging mode, but the situation was the same as before.