I am looking to debug an issue in my cockpit module(cockpit-session-recording) as I believe I am not getting all the output from the cockpit spawn returned object. I have a few questions from my initial investigation:

In src/base1/cockpit.js I see:

    function spawn_debug() {
        if (window.debugging == "all" || window.debugging == "spawn")
            console.debug.apply(console, arguments);

How do I enable this debugging?

I also went through the below steps but I'm not sure which cockpit process I need to debug.


Is it correct to assume cockpit_pipe_spawn() in src/common/cockpitpipe.c is the C interface that the cockpit.spawn API calls underneath?

If there are better ideas, or i'm going about this in the wrong way then I'm open to suggestions.

Thank you in advance.