How to attach DAP process?

Viewed 23

I start my DebugAdapter process with --inspect=6010, but i can't attach the DAP process.

createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
        
        executable?.args.push("--max-old-space-size=8192");
        if(PremiumFeatures.getInstance().isEnabled()) {
            executable?.args.push("--premium");
        }

        if (process.env.NODE_ENV != "production") {
            executable?.args.push('--nolazy');
            executable?.args.push("--inspect=6010");
        }

        executable?.args.push("--storagePath=" + this.storagePath);
        executable?.args.push("--extensionPath=" + this.extensionPath);
        return executable;
    }

LSP process start in the same way with --inspect=6009 which i can attach it.

I'm wondering why one of these two processes can be attached, but the other one can't

enter image description here

1 Answers

we put --inspect=6010 before the script.

node --inspect=6010 index.js

not:

node index.js --inspect=6010

Related