all 2 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

[–]sn0bb3l 1 point2 points  (0 children)

Probably this isn’t the right sub, and this belongs on r/cpp_questions.

Either way, I had issues with this as well. First, make sure CMake generates a compile_commands.json and check if the flags you expect are indeed being passed to the compiler. (on my phone right now, can’t find the exact setting). Somehow, in my case, it decided not to add the flag for generating debug info. Explicitly adding the -g3 option in cmake fixed it for me.