mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-24 15:25:31 -04:00
Attach console in debug mode on Windows
This commit is contained in:
parent
3d10f31211
commit
c6bd22aa12
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue