Indium icon indicating copy to clipboard operation
Indium copied to clipboard

No way to debug a child process

Open CADBOT opened this issue 3 years ago • 1 comments

I have a node service that periodically spins up a child process to process things. My process for debugging it in the past was to launch with --inspect and --inspect-brk than point the built in chrome debugger into it. I've also been able to set it up with vscode using the following config options

        {
            // Notes:
            // Pauses any child connection process started by connect so that you can attach a debugger.
            // - Run connection
            // - Open up chrome, go to chrome://inspect
            // - Attach to the process
            "type": "node",
            "request": "launch",
            "name": "Debug Child Service",
            "program": "${workspaceRoot}/server.js",
            "cwd": "${workspaceRoot}/src/server.js",
            "env": {
                "DEBUG_STREAM_PROCESS": "1",
                "DEBUG_STREAM_PROCESS_BRK": "1",
            },
            "smartStep": false,
            "outputCapture": "std",
            "autoAttachChildProcesses": true,
            "console": "internalConsole",
        },

I believe the essential field here that's missing is the autoAttachChildProccessse one.

In other words I don't want Indium to create any processes to debug. I want it to watch for a child process created with the debugger flags.

Unless I'm mistaken, this isn't currently possible

CADBOT avatar Sep 23 '20 23:09 CADBOT

@CADBOT could you provide a minimal node app to reproduce the issue?

NicolasPetton avatar Nov 03 '20 20:11 NicolasPetton