Skip to content

Commit

Permalink
use getConfiguration launch to read debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Jul 25, 2024
1 parent 9588ad6 commit 1f6251a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/cdtDebugAdapter/debugConfProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class CDTDebugConfigurationProvider
"mon reset halt",
"maintenance flush register-cache",
"thb app_main",
"c"
];
}

Expand Down
15 changes: 8 additions & 7 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2633,13 +2633,14 @@ export async function activate(context: vscode.ExtensionContext) {
);
return;
}
const launchJson = await readJson(launchJsonPath);
if (
launchJson &&
launchJson.configurations &&
launchJson.configurations.length
) {
for (const conf of launchJson.configurations) {
const config = vscode.workspace.getConfiguration("launch", workspaceRoot);

// retrieve values
const configurations = config.get(
"configurations"
) as vscode.DebugConfiguration[];
if (configurations && configurations.length) {
for (const conf of configurations) {
if (conf.type === "gdbtarget") {
await vscode.debug.startDebugging(workspaceFolder, conf.name);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/pythonManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export async function execProcessWithLog(
undefined,
undefined,
cancelToken,
pyTracker.Log
undefined
);
Logger.info(processResult + "\n");
if (pyTracker) {
Expand Down

0 comments on commit 1f6251a

Please sign in to comment.