User forums > Using Code::Blocks

Why doesn't CodeBlocks turn on debugging when I wanna compile a single file?

(1/3) > >>

Oleg:
Why doesn't CodeBlocks turn on debugging when I wanna compile a single file? I see that the debugging feature is turned on only when working on a project, but not on a single file. Let's assume I wanna compile and run just a single C++ file. How do I turn on the debugging feature in this case? (Besides the obvious -g option, but you know what I mean).

MortenMacFly:

--- Quote from: Oleg on March 02, 2010, 07:32:21 pm ---How do I turn on the debugging feature in this case?

--- End quote ---
This is not possible / implemented. You'll need a project for the debugger. There are many reasons for this. One is that the debugger needs a path configuration available only through the project settings.

Single file support is limited to compilation, only. Sorry.

Oleg:
 Okay, when I try to add my file to a newly created project, some mess happens and codeblocks doesn't wanna build, run, or debug the file. Also, for some reason, the project created its own file (main.cpp) and, of course, I don't really need it. Please tell me what to do to successfully add my single file to a project without creating a mess, so I could debug it.

MortenMacFly:

--- Quote from: Oleg on March 02, 2010, 08:16:53 pm ---Please tell me what to do to successfully add my single file to a project without creating a mess, so I could debug it.

--- End quote ---
- Create an empty project (not a console application or alike)
- Add the file to the project.

For the very IDE basics consult the documentation of Code::Blocks.

Oleg:
When I try to add the file to an empty project, it asks me to overwrite it. I don't know what I am doing wrong.

Navigation

[0] Message Index

[#] Next page

Go to full version