Conversation
|
|
||
| # LINUX: name of Unity executable | ||
| # MACOS: name of the .app directory | ||
| executable_name="RimWorldLinux" |
There was a problem hiding this comment.
I think you missed changing this to the correct default value. I know it's always set in the calling code, but since this OSX specific it makes sense to make the default make sense for OSX as well
| debug_address="127.0.0.1:56000" | ||
|
|
||
| # If 1 and debug_enabled is 1, Mono debugger server will suspend the game execution until a debugger is attached | ||
| debug_suspend="1" |
There was a problem hiding this comment.
Is there a need for this specifically on OSX, or was this added mostly just for debugging purposes? None of the other OS' are configured to suspend until the debugger attaches, so if OSX doesn't actually require it it would be better to stay consistent with the other platforms. It'd also mean we don't need to add the waitForMonoDebugger() polling code
There was a problem hiding this comment.
Dropped - barking up the wrong tree.
| // Doorstop's verbose stdout (MEMORY MAP + BIND_OPCODE dump) directly to a temp file — | ||
| // this avoids the 64KB pipe buffer deadlock without needing a drain thread, and | ||
| // preserves the output for diagnostics. | ||
| val gameProcess: Process? = if (OS.CURRENT == OS.macOS || OS.CURRENT == OS.Linux) { |
There was a problem hiding this comment.
Can you explain why this change was made? Going through the rimworldState.execute() was working for Linux, wasn't it? And it looks like the process for Linux and OSX only really differs in that the files for OSX were wrong and the run.sh might be different.
- Update executable name - debug suspend to 0 - remove waitForMonoDebugServer - revert processbuilder stuff
|
There is a remaining issue - the mac "executable" being a folder in reality means the file picker doesn't work, and you have to copy/paste or type the path in instead. Workable as is, probably a follow up PR to sort that out. Maybe if on mac, just open a folder picker instead of file. |
rimworldState.execute() fails silently in Rider's coroutine context on macOS/Linux. Reverts to ProcessBuilder direct launch which is proven to work. Also removes dead debugWithScript code path from RunConfiguration (ProcessBuilder in RunState handles this), trims verbose comments, and aligns doorstop_config.ini debug_suspend with run.sh.
| // On macOS/Linux we must bypass rimworldState.execute() for two reasons: | ||
| // 1. CommandLineState.execute() has implicit EDT dependencies (console view creation) | ||
| // that fail silently when called from this suspend function's coroutine context. | ||
| // 2. On macOS, the 'open' command launches apps through launchd, which is SIP-protected |
There was a problem hiding this comment.
Added a comment here to explain why this is required on mac for future reference
| val file = file(f) | ||
| if (!file.exists()) throw RuntimeException("File ${file} does not exist") | ||
| }) | ||
|
|

Fix macOS Debug Support
Got debugging working finally on Mac. I did use AI to help track this down, and make some of the changes.
I'm not sure if the
build.gradle.ktschanges are needed - they were for me to run things from gradle to test though.What changed
Notes