orshefi
orshefi

Reputation: 1

Can I capture breakpoint event on vscode?

I want to capture a breakpoint event on the debugger adapter in order to create an action in response.

Can it be done?

Upvotes: 0

Views: 576

Answers (1)

Manuel Pap
Manuel Pap

Reputation: 1399

Based on the VS Code API, the event onDidChangeBreakpoints allows to capture the status of the breakpoints

Example:

const vscode = require('vscode');

context.subscriptions.push(vscode.debug.onDidChangeBreakpoints(
        session => {
            vscode.debug.registerDebugAdapterDescriptorFactory
            console.log("Breakpoint changed");              
        }
    ))

session contains added, changed and removed properties.

Upvotes: 2

Related Questions