diff options
Diffstat (limited to 'source/slangc/main.cpp')
| -rw-r--r-- | source/slangc/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp index 3a01c07e7..b86472617 100644 --- a/source/slangc/main.cpp +++ b/source/slangc/main.cpp @@ -139,6 +139,15 @@ int wmain(int argc, wchar_t** argv) } #ifdef _MSC_VER + // "When _DEBUG isn't defined, calls to _CrtSetReportMode are removed + // during preprocessing." + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); + _CrtDumpMemoryLeaks(); #endif |
