-3

I built my C++ project (CMake) in VSCode on Linux, but when I start the application (debugging), the breakpoint in my main() function is immediately disabled. Yes, the source is built with -g switch.

The question is: can breakpoints be used in VSCode?

If yes, could you please explain in detail how?

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
  • 3
    Yes they can definitely be used. Presumably something wrong with you configuration if it is not working for you. To get help with that you need to post your configuration files. – john Aug 26 '23 at 10:14
  • 1
    *'Crappy youtube clips'*. The place you should go is the official documentation [here](https://code.visualstudio.com/docs/setup/linux) and [here](https://code.visualstudio.com/docs/cpp/config-linux#_prerequisites). If you have not followed that, then I would recommend starting again, and following the official documentation very very carefully. VSCode is notoriously complicated to configure. – john Aug 26 '23 at 10:16
  • Please show a [mre], it's impossible for us to answer with much more than "read the documentation" with the level of detail you've provided. How are you launching the debugger? Are you using a release or debug cmake configuration? Are you using the cmake plugin? It should be able to configure everything for you automatically – Alan Birtles Aug 26 '23 at 11:30

0 Answers0