Index: source/Core/Debugger.cpp =================================================================== --- source/Core/Debugger.cpp +++ source/Core/Debugger.cpp @@ -50,6 +50,12 @@ #if defined(_WIN32) #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX +#include "windows.h" + +#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 +#endif + #endif #include "llvm/ADT/None.h" // for None @@ -804,6 +810,14 @@ // Turn off use-color if we don't write to a terminal with color support. if (!m_output_file_sp->GetFile().GetIsTerminalWithColors()) SetUseColor(false); + +#if defined(_WIN32) + HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + DWORD consoleMode; + GetConsoleMode(hConsole, &consoleMode); + consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetUseColor(SetConsoleMode(hConsole, consoleMode)); +#endif } Debugger::~Debugger() { Clear(); }