Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a project that came with a piece of hardware.
The project has only a release configuration defined. I would like to add a debug configuration so I can run the program in the debugger.

Does anyone know how to do this?

There is a Configurations menu item under Build where a configuration can be added, but adding a debug configuration just creates a copy of the release configuration (there is a drop-down list for "Copy settings from:" that lists the release configuration as the only option).

Thanks in advance.
Posted
Updated 23-Mar-11 6:07am
v3

After creating Debug configuration from Release, modify the Debug settings as follows:

General | Intermediate and Output files: Debug
Debug | Executables for debug session : [fill in correct full path]

C/C++ | General | Optimizations: Disable (Debug)
C/C++ | General | Code Generation: Use run-time library: Debug Multithreaded DLL
C/C++ | Preprocessor | Preprocessor definitions: add _DEBUG

Link | General | Generate debug info: checked
Link | Customize | Use program database: checked
Link | Debug | Debug info: checked
Link | Debug | Separate types: checked
Link | Debug | Microsoft format: selected

Cruise through the other tabs to make sure paths, etc., are correct (e.g., Debug instead of Release).

If you have any problems, please post here.
 
Share this answer
 
v2
If you use the menu to go to Project > Settings, you get a dialog where you can configure each build.
Select the debug build (e.g. "Win32 Debug") from the combobox in the top left corner.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900