Hi everyone -
Partly to help document this for others, but also - I need to do this - I would like to put together the 2023 best practice for setting up SuperCollider development environments for Mac, Windows and Linux.
I have a Linux ticket that I’ve been wanting to work on, but just couldn’t quite get things working on my Mac with a virtual Ubuntu Parallels port. I think going the Parallels route is still going to work, but I’m wondering (for each platform) what the best path is. I can put together suggestions for Mac this week … my goals would be finding a good combo of
IDE / Code editors
Supporting debug builds with breakpoints
for the C++ source. I was trying to go the CLion route in Ubuntu, but I’m not sure if this is the best path forward.
Thoughts? Like I said, I’ll share what my environment for Mac looks like later this week. My ideal for future development is to be able to build / test / debug on all three platforms on my Mac via parallels, so Windows suggestions are also needed.
follow the README for installing libraries, cmake, etc
Generate an Xcode based cmake target - this creates a single file with all code that will help with debugging - BUT - I suggest compiling still from cmake’s command line interface
To debug C++ code with breakpoints:
compile SC with a debug target
Start SC and boot the server
Open Xcode and the cmake generated project
From here, you can attach to the running executable from the menu for Debug → Attach to Process
Clion seems to be working well for me on Arch linux. I’m able to attach to process from the ‘Run’ menu within Clion. On first attempt I was shown an error that lead me to this page - maybe it’s helpful: https://www.jetbrains.com/help/clion/attaching-to-local-process.html.
Let me know if you would like me to do a specific test, there could be some finer details I’m not aware of.
For linux, I found the existing documentation for setting up a development environment really clear. These are the instructions I followed.
I’d also be happy to help with this process, as I have all three major OSs as home, although I’ll admit that I rarely use SC on Windows and I’ve never built it on that platform. I have built it from source on Mac and Ubuntu; on Linux hosts, I usually do so to get the most recent packages.
I’m not an expert with C++ debugging tools, but that’s a skillset I’ve been wanting to acquire for some time, so please let me know if I can be of assistance!