I am trying to step through a C project (fossil-scm) that has a 2-phase pre-processing stage.
First there is a custom built pre-processing program, that goes through the files and fixes certain project-specific macros, creates the include headers, and a few other things. It creates a bunch of .c
and .h
files. The result is then compiled as usual, passing through the "regular" pre-processor.
I took the result from the first part and created a visual-studio project from it. When I tried to debug it, it was skipping my breakpoints. I found that every file begins with a
#line 1 "src/original_filename.c"
I can comment out this line and get debugging to work, but I would rather use this line to get debugging in the original context.
So...
How can I set it up so that it compiles the processed files, but uses the #line
directives to give me debugging capabilities in the original files?
I tried just placing the src
directory next to the files, and it works if I start the program by pressing F10
, but I don't know how to get the original files into the project explorer so that I can easily open them and place breakpoints without the compiler trying to compile them.