mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Add output window filtering options similar to what Visual Studio
offers. To use right click on output window, and select which messages should appear and which should be filtered out. By default all types of messages appear as they normally would before this change. These settings are persisted into workspace_user file This change helps keep the clutter out of the output window so that program output logs are easier to read, especially on application startup.
This commit is contained in:
parent
da23ba4aa7
commit
d9d954254f
7 changed files with 221 additions and 15 deletions
|
@ -1708,7 +1708,9 @@ bool WinDebugger::DoUpdate()
|
|||
mDebuggerWaitingThread = newThreadInfo;
|
||||
mThreadList.push_back(mDebuggerWaitingThread);
|
||||
UpdateThreadDebugRegisters();
|
||||
OutputMessage(StrFormat("Creating thread from CREATE_PROCESS_DEBUG_EVENT %d\n", mDebugEvent.dwThreadId));
|
||||
|
||||
if (!(gDebugManager->GetOutputFilterFlags() & BfOutputFilterFlags_ThreadCreateMessages))
|
||||
OutputMessage(StrFormat("Creating thread from CREATE_PROCESS_DEBUG_EVENT %d\n", mDebugEvent.dwThreadId));
|
||||
|
||||
threadInfo = mDebuggerWaitingThread;
|
||||
mProcessInfo.dwThreadId = threadInfo->mThreadId;
|
||||
|
@ -1776,10 +1778,14 @@ bool WinDebugger::DoUpdate()
|
|||
else
|
||||
exitCodeStr = StrFormat("%d", exitCode);
|
||||
|
||||
if (!exitMessage.IsEmpty())
|
||||
OutputMessage(StrFormat("Process terminated. ExitCode: %s (%s).\n", exitCodeStr.c_str(), exitMessage.c_str()));
|
||||
else
|
||||
OutputMessage(StrFormat("Process terminated. ExitCode: %s.\n", exitCodeStr.c_str()));
|
||||
if (!(gDebugManager->GetOutputFilterFlags() & BfOutputFilterFlags_ProcessExitMessages))
|
||||
{
|
||||
if (!exitMessage.IsEmpty())
|
||||
OutputMessage(StrFormat("Process terminated. ExitCode: %s (%s).\n", exitCodeStr.c_str(), exitMessage.c_str()));
|
||||
else
|
||||
OutputMessage(StrFormat("Process terminated. ExitCode: %s.\n", exitCodeStr.c_str()));
|
||||
}
|
||||
|
||||
mRunState = RunState_Terminated;
|
||||
mDebugManager->mOutMessages.push_back("modulesChanged");
|
||||
}
|
||||
|
@ -1858,7 +1864,8 @@ bool WinDebugger::DoUpdate()
|
|||
stream.mFileHandle = 0;
|
||||
}
|
||||
|
||||
OutputMessage(loadMsg + "\n");
|
||||
if (!(gDebugManager->GetOutputFilterFlags() & BfOutputFilterFlags_ModuleLoadMessages))
|
||||
OutputMessage(loadMsg + "\n");
|
||||
|
||||
if (altFileHandle != INVALID_HANDLE_VALUE)
|
||||
::CloseHandle(altFileHandle);
|
||||
|
@ -1913,7 +1920,7 @@ bool WinDebugger::DoUpdate()
|
|||
mDebugManager->mOutMessages.push_back("modulesChanged");
|
||||
}
|
||||
|
||||
if (!name.empty())
|
||||
if (!(gDebugManager->GetOutputFilterFlags() & BfOutputFilterFlags_ModuleUnloadMessages) && !name.empty())
|
||||
OutputMessage(StrFormat("Unloading DLL: %s @ %0s\n", name.c_str(), EncodeDataPtr((addr_target)(intptr)mDebugEvent.u.UnloadDll.lpBaseOfDll, true).c_str()));
|
||||
|
||||
BfLogDbg("UNLOAD_DLL_DEBUG_EVENT %s\n", name.c_str());
|
||||
|
@ -1959,12 +1966,15 @@ bool WinDebugger::DoUpdate()
|
|||
mDebuggerWaitingThread = threadInfo;
|
||||
mThreadList.push_back(mDebuggerWaitingThread);
|
||||
UpdateThreadDebugRegisters();
|
||||
OutputMessage(StrFormat("Creating thread %d\n", mDebugEvent.dwThreadId));
|
||||
if (!(gDebugManager->GetOutputFilterFlags() & BfOutputFilterFlags_ThreadCreateMessages))
|
||||
OutputMessage(StrFormat("Creating thread %d\n", mDebugEvent.dwThreadId));
|
||||
}
|
||||
break;
|
||||
case EXIT_THREAD_DEBUG_EVENT:
|
||||
{
|
||||
OutputMessage(StrFormat("Exiting thread %d\n", mDebugEvent.dwThreadId));
|
||||
if (!(gDebugManager->GetOutputFilterFlags() & BfOutputFilterFlags_ThreadExitMessages))
|
||||
OutputMessage(StrFormat("Exiting thread %d\n", mDebugEvent.dwThreadId));
|
||||
|
||||
if (mSteppingThread == threadInfo)
|
||||
{
|
||||
// We were attempting stepping on this thread, but not anymore!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue