VSCode breakpoints don't work in generated cpp #589
-
I won't make a bug report for the project in case this is a VSCode config issue. Using VSCode with gcc 11 on Ubuntu 22.04. Using just the simple hello world program, but the breakpoints I set in the generated cpp file don't get hit. The program itself runs properly. hello.cpp2
I can run the binary with gdb through command line and set and hit a breakpoint. But obviously would prefer to work with the VSCode interface. And of course a regular old syntax1 cpp file (with no #include "cpp2util.h") I can set and hit breakpoints with VSCode just fine. Any clues what the issue could be? Is something in cpp2util.h making VSCode confused? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
See also modern-cmake/cppfront#93. I have a similar issue with Clang in QtCreator. |
Beta Was this translation helpful? Give feedback.
See also modern-cmake/cppfront#93.
I have a similar issue with Clang in QtCreator.
When I start debugging with the option "from
main
", which doesn't require a breakpoint, I'm taken to the disassembler.Like I did, maybe you can work around it by compiling the Cpp2 source file by passing the flag
-clean-cpp1
tocppfront
.That makes it so errors at Cpp1 time aren't mapped to the Cpp2 source location, so it helps having another build without
-clean-cpp1
.