I'm developing a C++ application which is going to use multiple child processes, and these child processes must be spawned by the parent process so that pipes can be set up correctly. Currently, my child process is crashing somewhere in startup. I've previously been able to just run the VSCode debugger and just let it break on the exception or signal and debug things from there. But to my horror, I found out that apparently that doesn't work if you're debugging the parent process, as nothing watches the child process.
I've spent the past two days getting fed up with the internet over this problem.
- Apparently the
cppvsdbg
debugger (which I've been using as this is an MSVC project on Windows, and I haven't even gotten to the cross platform part yet) does NOT support debugging a child process despite having a feature request for it SINCE 2017!! Even the freaking Chrome and Edge dev teams chimed in on this thread and still nothing. - There's additionally no way I can ADD the above feature, because the
vsdbg
program used behind the scenes is closed source. - I apparently can't use GDB because that requires the program to be built in gcc/g++ and not MSVC, and I've already spent about a month cumulatively working on this stupid CMake build system to actually get it to function.
- I've tried to run my program in Visual Studio and couldn't figure out how to actually get it to run. It's far too deep in CMake territory for VS to even understand it apparently.
- I've tried to debug my program using Qt Creator's debugger*, as it has a thing that can apparently attach to a program the moment it detects it starting, but the subprocess is just crashing so fast that it doesn't catch the thing 80% of the time, and the other 20% it doesn't breakpoint on the crash.
- I've installed about five other debugging extensions into VSCode trying to get something to function, but every single one of them has failed in a new and different way, up to including
lldb
requiring an end-of-life'd version of python of all things in order to even function.
I'm losing my mind here. Please tell me there's something I'm missing, or something obvious I'm overlooking. This project is literally in its infancy and if I can't find some method to debug all the processes going forward, it's just going to multiply the development problems in the future.
*I'll tag this with Qt as well because I'm using QProcess to spawn the child process, but that's not what's actually causing the problem here.