Friday, April 3, 2015

Visual C++ Release에서 디버깅하기 위한 설정

Release모드에서 디버그를 하기 위해서 Debug모드와 동일하게 설정할 경우 설정할 목록이다.
일반적으로 Debug information 만 생성하면 되는줄 알았는데 그게 아니었다.

Release에서 Debug를 하는 경우가 어떤 경우가 있냐면 Release/Debug를 나누지 않고 개발할때, 아니면 긴박한 Release모드에서의 버그를 수정할때이다.

Project Properties - Configuration Properties에서 다음과 같은 항목을 명시된 값으로 변경한 후에 재컴파일 하면 된다.

[C/C++] - [General] - [Debug] - Program Database (/Zi)
[C/C++] - [Optimization] - [Optimization] - Disabled (/Od)
[C/C++] - [Optimization] - [Whole Program] - No
[Linker] - [Debugging] - [Generate Debug Info] - Yes (/DEBUG)
[Linker] - [Debugging] - [Debuggable Assembly] - Runtime tracking and disable
optimizations (/ASSEMBLYDEBUG)

No comments:

Post a Comment