Add -debugwait cmd line arg to wait for C# debugger attach on engine start
This commit is contained in:
@@ -109,7 +109,10 @@ bool CommandLine::Parse(const Char* cmdLine)
|
||||
PARSE_BOOL_SWITCH("-novsync ", NoVSync);
|
||||
PARSE_BOOL_SWITCH("-nolog ", NoLog);
|
||||
PARSE_BOOL_SWITCH("-std ", Std);
|
||||
#if !BUILD_RELEASE
|
||||
PARSE_ARG_SWITCH("-debug ", DebuggerAddress);
|
||||
PARSE_BOOL_SWITCH("-debugwait ", WaitForDebugger);
|
||||
#endif
|
||||
#if PLATFORM_HAS_HEADLESS_MODE
|
||||
PARSE_BOOL_SWITCH("-headless ", Headless);
|
||||
#endif
|
||||
|
||||
@@ -49,11 +49,20 @@ public:
|
||||
/// </summary>
|
||||
Nullable<bool> Std;
|
||||
|
||||
#if !BUILD_RELEASE
|
||||
|
||||
/// <summary>
|
||||
/// -debug !ip:port! (Mono debugger address)
|
||||
/// </summary>
|
||||
Nullable<String> DebuggerAddress;
|
||||
|
||||
/// <summary>
|
||||
/// -debugwait (instructs Mono debugger to wait for client attach for 5 seconds)
|
||||
/// </summary>
|
||||
Nullable<bool> WaitForDebugger;
|
||||
|
||||
#endif
|
||||
|
||||
#if PLATFORM_HAS_HEADLESS_MODE
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -423,7 +423,7 @@ bool MCore::LoadEngine()
|
||||
}
|
||||
|
||||
char buffer[150];
|
||||
sprintf(buffer, "--debugger-agent=transport=dt_socket,address=%s:%d,embedding=1,server=y,suspend=n,loglevel=%d", debuggerIp.Get(), debuggerPort, debuggerLogLevel);
|
||||
sprintf(buffer, "--debugger-agent=transport=dt_socket,address=%s:%d,embedding=1,server=y,suspend=%s,loglevel=%d", debuggerIp.Get(), debuggerPort, CommandLine::Options.WaitForDebugger ? "y,timeout=5000" : "n", debuggerLogLevel);
|
||||
|
||||
const char* options[] = {
|
||||
"--soft-breakpoints",
|
||||
|
||||
Reference in New Issue
Block a user