Often wondered why your application is not hitting up with break point when you try to debug it? OR wondered why the command line arguments you entered with VS IDE is not taken by your App? OR why your intended entry point is not hit by debugger (main/ winmain)?
If you wondered/puzzled by any of the above behavior then you MUST read this post! :)
Make sure the following things are set correctly before you start debugging your project in VS 2005:
1. If your project is among many many projects in a solution then make sure it is selected as "Set as start up project" by right clicking on the project
2. Select Linker->Subsystem as per your application's entry point function. For inst: it should be CONSOLE if your app is typical console app, /SUBSYSTEM:WINDOWS if your app is windows app
3. Set the required CL argument from Debugging->Command arguments
4. set C/C++->Optimization = Disabled
5. C/C++ -> Code Generation -> Runtime Library = Multi-threaded Debug (/MTd)or Multi-threaded Debug DLL (/MDd)
6. Linker->Debugging->Generate Debug Info = YES
If you wondered/puzzled by any of the above behavior then you MUST read this post! :)
Make sure the following things are set correctly before you start debugging your project in VS 2005:
1. If your project is among many many projects in a solution then make sure it is selected as "Set as start up project" by right clicking on the project
2. Select Linker->Subsystem as per your application's entry point function. For inst: it should be CONSOLE if your app is typical console app, /SUBSYSTEM:WINDOWS if your app is windows app
3. Set the required CL argument from Debugging->Command arguments
4. set C/C++->Optimization = Disabled
5. C/C++ -> Code Generation -> Runtime Library = Multi-threaded Debug (/MTd)or Multi-threaded Debug DLL (/MDd)
6. Linker->Debugging->Generate Debug Info = YES
No comments:
Post a Comment