Search code examples
visual-c++visual-studio-2008linkervisual-studio-debuggingcl

How to build a project in debug rather that release in msvc command line


I have makefile and multiple *.mak files for a cpp project which gives release build. I want to have a debug build so that I can debug some crt functions. For compiling cl is used linker is link The flags are overwhelming for me.


Solution

  • How to build a project in debug rather that release in msvc command line

    You can try to build the project in MSBuild command line with argument /property:Configuration=Debug, like:

    c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe YourProject.proj /target:rebuild "/property:Configuration=Debug
    

    enter image description here

    Check the document MSBuild command-line reference for some more details.

    Hope this helps.