Skip to content

Commit

Permalink
Updating debug configuration provider, instead of using initialConfig…
Browse files Browse the repository at this point in the history
…urations in package.json, which is deprecated, using function provideDebugConfigurations. (#902)
  • Loading branch information
ashish-gawali-adi committed Aug 23, 2023
1 parent b74c8b1 commit a17c1ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 0 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2839,17 +2839,6 @@
"label": "Cortex Debug: ST-Util"
}
],
"initialConfigurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceFolder}",
"executable": "./bin/executable.elf",
"request": "launch",
"type": "cortex-debug",
"runToEntryPoint": "main",
"servertype": "jlink"
}
],
"label": "Cortex Debug",
"program": "./dist/debugadapter.js",
"runtime": "node",
Expand Down
12 changes: 12 additions & 0 deletions src/frontend/configprovider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ const JLINK_VALID_RTOS: string[] = ['Azure', 'ChibiOS', 'embOS', 'FreeRTOS', 'Nu
export class CortexDebugConfigurationProvider implements vscode.DebugConfigurationProvider {
constructor(private context: vscode.ExtensionContext) {}

public provideDebugConfigurations(): vscode.ProviderResult<vscode.DebugConfiguration[]> {
return [{
name: 'Cortex Debug',
cwd: '${workspaceFolder}',
executable: './bin/executable.elf',
request: 'launch',
type: 'cortex-debug',
runToEntryPoint: 'main',
servertype: 'jlink'
}];
}

public resolveDebugConfiguration(
folder: vscode.WorkspaceFolder | undefined,
config: vscode.DebugConfiguration,
Expand Down

0 comments on commit a17c1ac

Please sign in to comment.