mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Attach console in debug mode on Windows
This commit is contained in:
parent
3d10f31211
commit
c6bd22aa12
@ -30,6 +30,14 @@ WinUtils* WinUtils::instance()
|
||||
{
|
||||
if (!m_instance) {
|
||||
m_instance = new WinUtils(qApp);
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
// Attach console to enable debug output
|
||||
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||
freopen("CONOUT$", "w", stdout);
|
||||
freopen("CONOUT$", "w", stderr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return m_instance;
|
||||
|
Loading…
Reference in New Issue
Block a user