aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NorthstarLauncher/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/NorthstarLauncher/main.cpp b/NorthstarLauncher/main.cpp
index 92c7de7a..17128e5b 100644
--- a/NorthstarLauncher/main.cpp
+++ b/NorthstarLauncher/main.cpp
@@ -324,6 +324,15 @@ HMODULE LoadDediStub(const char* name)
int main(int argc, char* argv[])
{
+ if (strstr(GetCommandLineA(), "-waitfordebugger"))
+ {
+ while (!IsDebuggerPresent())
+ {
+ // Sleep 100ms to give debugger time to attach.
+ Sleep(100);
+ }
+ }
+
if (!GetExePathWide(exePath, sizeof(exePath)))
{
MessageBoxA(