Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,14 @@ export class GDBDebugSession extends LoggingDebugSession {
commands.push(...this.args.postLaunchCommands.map(COMMAND_MAP));
}
} catch (err) {
const msg = err.toString() + '\n' + err.stack.toString();
this.sendEvent(new TelemetryEvent('Error', 'Launching GDB', `Failed to generate gdb commands: ${msg}`));
this.launchErrorResponse(response, 104, `Failed to generate gdb commands: ${msg}`);
let msg: string;
if (err instanceof MIError) {
msg = `Failed to initialize GDB: ${err.message}\n\nFailed on command:\n${err.source}`;
} else {
msg = 'Failed to generate gdb commands: ' + err.toString() + '\n' + err.stack.toString();
}
this.sendEvent(new TelemetryEvent('Error', 'Launching GDB', msg));
this.launchErrorResponse(response, 104, msg);
return doResolve();
}

Expand Down