Wednesday, September 17, 2014

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


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

Release 모드에서 디버깅을 하는 경우가 어떤 경우가 있냐면 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] - [Debugging] - [Runtime tracking and disable optimizations (/ASSEMBLYDEBUG)]

No comments:

Post a Comment