How to use the vscode-debugadapter.Breakpoint function in vscode-debugadapter

To help you get started, we’ve selected a few vscode-debugadapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookarchive / atom-ide-ui / modules / atom-ide-debugger-python / VendorLib / vs-py-debugger / out / client / debugger / Main.js View on Github external
onBreakpointChanged(breakpointId, verified) {
        if (!this.registeredBreakpoints.has(breakpointId)) {
            return;
        }
        const pythonBkpoint = this.registeredBreakpoints.get(breakpointId);
        const breakpoint = new vscode_debugadapter_1.Breakpoint(verified, pythonBkpoint.LineNo, undefined, new vscode_debugadapter_1.Source(path.basename(pythonBkpoint.Filename), pythonBkpoint.Filename));
        // VSC needs `id` to uniquely identify each breakpoint (part of the protocol spec).
        breakpoint.id = pythonBkpoint.Id;
        this.sendEvent(new vscode_debugadapter_1.BreakpointEvent('changed', breakpoint));
    }
    buildBreakpointDetails(filePath, line, condition) {
github adelphes / android-dev-ext / src / debugMain.js View on Github external
.then(javabp => {
                    if (!javabp.vsbp) {
                        // state is one of: set,notloaded,enabled,removed
                        var verified = !!javabp.state.match(/set|enabled/);
                        const bp = new Breakpoint(verified, this.convertDebuggerLineToClient(dbgline));
                        // the breakpoint *must* have an id field or it won't update properly
                        bp.id = ++this._breakpointId;
                        if (javabp.state === 'notloaded')
                            bp.message = 'The runtime hasn\'t loaded this code location';
                        javabp.vsbp = bp;
                    }
                    javabp.vsbp.order = idx;
                    javabp_arr.push(javabp);
                }).
                then((/*javabp*/) => _setup_breakpoints(o, ++idx, javabp_arr));
github hackwaly / vscode-ocaml / src / debug / debug.ts View on Github external
let breakpoint = null;
                if (match) {
                    let filename = match[2];
                    // Ugly hack.
                    if (source && !this._filenameToPath.has(filename) && source.path && source.path.endsWith(filename)) {
                        this._filenameToPath.set(filename, source.path);
                    }
                    breakpoint = new Breakpoint(
                        true,
                        +match[3],
                        +match[4],
                        this.getSource(filename)
                    );
                    breakpoint[OCamlDebugSession.BREAKPOINT_ID] = +match[1];
                } else {
                    breakpoint = new Breakpoint(false);
                }
                resolve(breakpoint);
            });
        });
github DonJayamanne / pythonVSCode / src / client / debugger / Main.ts View on Github external
private onBreakpointChanged(breakpointId: number, verified: boolean) {
        if (!this.registeredBreakpoints.has(breakpointId)) {
            return;
        }
        const pythonBkpoint = this.registeredBreakpoints.get(breakpointId)!;
        const breakpoint = new Breakpoint(verified, pythonBkpoint.LineNo, undefined, new Source(path.basename(pythonBkpoint.Filename), pythonBkpoint.Filename));
        // VSC needs `id` to uniquely identify each breakpoint (part of the protocol spec).
        (breakpoint as any).id = pythonBkpoint.Id;
        this.sendEvent(new BreakpointEvent('changed', breakpoint));
    }
    private buildBreakpointDetails(filePath: string, line: number, condition: string): IPythonBreakpoint {
github SqrTT / prophet / out / mockDebug.js View on Github external
                            .map(brk => new vscode_debugadapter_1.Breakpoint(true, this.convertDebuggerLineToClient(brk.line), undefined, new vscode_debugadapter_1.Source(brk.id + " - " + path_1.basename(scriptPath), this.convertDebuggerPathToClient(scriptPath))
                        //args.source.
                        ))
                    };
github felixfbecker / vscode-php-debug / src / phpDebug.ts View on Github external
            breakpoints = args.lines.map(line => new vscode.Breakpoint(false, line));
            breakpointsSetPromise = Promise.resolve();
github SqrTT / prophet / src / mockDebug.ts View on Github external
.map(brk =>
										new Breakpoint(
											true,
											this.convertDebuggerLineToClient(brk.line),
											undefined,
											new Source(
												brk.id + " - " + basename(scriptPath),
												this.convertDebuggerPathToClient(scriptPath)
											)
											//args.source.
										))
						};
github firefox-devtools / vscode-firefox-debug / src / adapter / adapter / breakpointsManager.ts View on Github external
public verifyBreakpoint(breakpointInfo: BreakpointInfo): void {

		if (!breakpointInfo.actualLocation) return;

		let breakpoint: DebugProtocol.Breakpoint = new Breakpoint(
			true, breakpointInfo.actualLocation.line, breakpointInfo.actualLocation.column + 1);
		breakpoint.id = breakpointInfo.id;
		this.sendEvent(new BreakpointEvent('changed', breakpoint));

		breakpointInfo.verified = true;
	}
github krotik / ecal / ecal-support / src / ecalDebugAdapter.ts View on Github external
breakpoints = (args.breakpoints || []).map((sbp) => {
          const breakpointString = `${sourcePath}:${sbp.line}`;

          const bp: DebugProtocol.Breakpoint = new Breakpoint(
            false,
            sbp.line,
            undefined,
            new Source(breakpointString, args.source.path)
          );
          bp.id = this.getBreakPointId(breakpointString);

          return bp;
        });
github area9innovation / flow9 / resources / vscode / flow / src / flowcpp_adapter.ts View on Github external
breakpoints: brkpoints.map(brkp => 
					new Breakpoint(brkp[0], brkp[0] ? brkp[1].line : undefined))
			};