How to avoid stepping into internal stl implementation when pressing F11 (step into) #13442
Unanswered
onecable5781
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am on Windows/CMake and call cl.exe and ninja for build.
I have the following code on Windows and I am trying to step through the code using VSCode cpptools extension and invoke cl.exe via CMake followed by a ninja.exe build.
Here, with the breakpoint set at the print call in main, hitting F11 takes me to the following line
inside of C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\vector
I would like to avoid having to step through such internal code and directly step into my user-written print function.
Interestingly, debug running this code and pressing F11 using Visual Studio .sln/.vcxproj native Visual Studio project/solution files does not go into the internal vector implementation. Opening the project inside of Visual Studio as a CMake project also does not take me into the internal vector implementation. I end up inside of the vector implementation only on using VSCode.
Is there a way to fix this issue?
This happens even when I try to compile the code with /JMC flag (Reference to Just My Code Debugging https://learn.microsoft.com/en-us/cpp/build/reference/jmc?view=msvc-170).
My compile_commands.json is:
My CMake task inside of tasks.json which invokes the configure/compile/build are:
XPost from /r/cpp_questions: https://www.reddit.com/r/cpp_questions/comments/1jnzfxt/stepping_into_userwritten_function_instead_of/
Beta Was this translation helpful? Give feedback.
All reactions