diff --git a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp index 56070b6..238d8c8 100644 --- a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp +++ b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp @@ -522,7 +522,7 @@ __declspec(dllexport) void TITCALL DebugLoop() } else //breakpoint not in list { - if(!FirstBPX) //program generated a breakpoint exception + if(DebugAttachedToProcess || !FirstBPX) //program generated a breakpoint exception { DBGCode = DBG_EXCEPTION_NOT_HANDLED; if(DBGCustomHandler->chBreakPoint != NULL) diff --git a/TitanEngine/TitanEngine.Debugger.cpp b/TitanEngine/TitanEngine.Debugger.cpp index 88705bb..3214c0d 100644 --- a/TitanEngine/TitanEngine.Debugger.cpp +++ b/TitanEngine/TitanEngine.Debugger.cpp @@ -547,13 +547,13 @@ __declspec(dllexport) bool TITCALL AttachDebugger(DWORD ProcessId, bool KillOnEx EngineSetDebugPrivilege(GetCurrentProcess(), true); DebugRemoveDebugPrivilege = true; } - if((engineSafeAttach ? DebugActiveProcess_ : DebugActiveProcess)(ProcessId)) + if(DebugActiveProcess_(ProcessId)) { funcDebugSetProcessKillOnExit = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugSetProcessKillOnExit"); if(funcDebugSetProcessKillOnExit != NULL) { myDebugSetProcessKillOnExit = (fDebugSetProcessKillOnExit)(funcDebugSetProcessKillOnExit); - myDebugSetProcessKillOnExit(KillOnExit && !engineSafeAttach ? true : false); + myDebugSetProcessKillOnExit(KillOnExit); } DebugDebuggingDLL = false; DebugAttachedToProcess = true;