Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to debug a child process #254

Open
CADBOT opened this issue Sep 23, 2020 · 1 comment
Open

No way to debug a child process #254

CADBOT opened this issue Sep 23, 2020 · 1 comment

Comments

@CADBOT
Copy link

CADBOT commented Sep 23, 2020

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

@NicolasPetton
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants