Skip to content

Commit

Permalink
add core dump
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Apr 28, 2024
1 parent 18e82e1 commit 5671403
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3107,20 +3107,23 @@ export async function activate(context: vscode.ExtensionContext) {
"Successfully created ELF file from the info received (espcoredump.py)",
});
try {
debugAdapterManager.configureAdapter({
isPostMortemDebugMode: true,
elfFile: resp.prog,
coreDumpFile: coreElfFilePath,
isOocdDisabled: true,
});
const workspaceFolder = vscode.workspace.getWorkspaceFolder(
workspaceRoot
);
await vscode.debug.startDebugging(workspaceFolder, {
name: "Core Dump Debug",
type: "espidf",
request: "launch",
sessionID: "core-dump.debug.session.ws",
type: "gdbtarget",
request: "attach",
gdb: gdbPath,
program: resp.prog,
logFile: `${path.join(
workspaceRoot.fsPath,
"coredump.log"
)}`,
target: {
connectCommands: [`core ${coreElfFilePath}`],
},
});
vscode.debug.onDidTerminateDebugSession((session) => {
if (
Expand Down

0 comments on commit 5671403

Please sign in to comment.