MCPcopy Index your code
hub / github.com/WebFreak001/code-debug / launchRequest

Method launchRequest

src/gdb.ts:55–94  ·  view source on GitHub ↗
(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments)

Source from the content-addressed store, hash-verified

53 }
54
55 protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
56 this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"], args.debugger_args, args.env);
57 this.setPathSubstitutions(args.pathSubstitutions);
58 this.initDebugger();
59 this.quit = false;
60 this.attached = false;
61 this.initialRunCommand = RunCommand.RUN;
62 this.isSSH = false;
63 this.started = false;
64 this.crashed = false;
65 this.setValuesFormattingMode(args.valuesFormatting);
66 this.miDebugger.printCalls = !!args.printCalls;
67 this.miDebugger.debugOutput = !!args.showDevDebugOutput;
68 this.stopAtEntry = args.stopAtEntry;
69 if (args.ssh !== undefined) {
70 if (args.ssh.forwardX11 === undefined)
71 args.ssh.forwardX11 = true;
72 if (args.ssh.port === undefined)
73 args.ssh.port = 22;
74 if (args.ssh.x11port === undefined)
75 args.ssh.x11port = 6000;
76 if (args.ssh.x11host === undefined)
77 args.ssh.x11host = "localhost";
78 if (args.ssh.remotex11screen === undefined)
79 args.ssh.remotex11screen = 0;
80 this.isSSH = true;
81 this.setSourceFileMap(args.ssh.sourceFileMap, args.ssh.cwd, args.cwd);
82 this.miDebugger.ssh(args.ssh, args.ssh.cwd, args.target, args.arguments, args.terminal, false, args.autorun || []).then(() => {
83 this.sendResponse(response);
84 }, err => {
85 this.sendErrorResponse(response, 105, `Failed to SSH: ${err.toString()}`);
86 });
87 } else {
88 this.miDebugger.load(args.cwd, args.target, args.arguments, args.terminal, args.autorun || []).then(() => {
89 this.sendResponse(response);
90 }, err => {
91 this.sendErrorResponse(response, 103, `Failed to load MI Debugger: ${err.toString()}`);
92 });
93 }
94 }
95
96 protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
97 this.miDebugger = new MI2(args.gdbpath || "gdb", ["-q", "--interpreter=mi2"], args.debugger_args, args.env);

Callers

nothing calls this directly

Calls 7

setPathSubstitutionsMethod · 0.95
initDebuggerMethod · 0.80
setSourceFileMapMethod · 0.80
toStringMethod · 0.80
sshMethod · 0.65
loadMethod · 0.65

Tested by

no test coverage detected