Skip to content

Conversation

@piotmag769
Copy link
Contributor

@piotmag769 piotmag769 commented Oct 6, 2025

Together with software-mansion-labs/cairo-debugger#1 it enables launching debuggers via vscode UI. These debuggers do absolutely nothing (for now)

Closes software-mansion-labs/cairo-debugger#8

Comment on lines +17 to +27
createDebugAdapterDescriptor(
session: vscode.DebugSession,
): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
const program = session.configuration["program"] as string;
const adapterProcess = spawn(program, { stdio: "pipe", env: process.env });
this.debugAdapterProcesses.push(adapterProcess);

return this.waitForFreePort(adapterProcess.stdout).then(
(port) => new vscode.DebugAdapterServer(port),
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
createDebugAdapterDescriptor(
session: vscode.DebugSession,
): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
const program = session.configuration["program"] as string;
const adapterProcess = spawn(program, { stdio: "pipe", env: process.env });
this.debugAdapterProcesses.push(adapterProcess);
return this.waitForFreePort(adapterProcess.stdout).then(
(port) => new vscode.DebugAdapterServer(port),
);
}
async createDebugAdapterDescriptor(
session: vscode.DebugSession,
): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
const program = session.configuration["program"] as string;
const adapterProcess = spawn(program, { stdio: "pipe", env: process.env });
this.debugAdapterProcesses.push(adapterProcess);
const port = await this.waitForFreePort(adapterProcess.stdout)
return new vscode.DebugAdapterServer(port);
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add debugger to vscode extension

3 participants