Skip to content

Commit

Permalink
Merge pull request #328 from Achal1607/fix-debugger
Browse files Browse the repository at this point in the history
Fixed broken debugger attach UI options
  • Loading branch information
sid-srini authored Nov 12, 2024
2 parents 648105e + e581187 commit 0397061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion vscode/src/commands/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export const extCommands = {
startupCondition: appendPrefixToCommand('startup.condition'),
nbEventListener: appendPrefixToCommand('addEventListener'),
selectEditorProjs: appendPrefixToCommand('select.editor.projects'),
attachDebugger: appendPrefixToCommand("java.attachDebugger.connector"),
attachDebuggerConnector: appendPrefixToCommand("java.attachDebugger.connector"),
attachDebuggerConfigurations: appendPrefixToCommand("java.attachDebugger.configurations"),
loadWorkspaceTests: appendPrefixToCommand("load.workspace.tests"),
projectDeleteEntry: appendPrefixToCommand("foundProjects.deleteEntry")
}
Expand Down
4 changes: 2 additions & 2 deletions vscode/src/debugger/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class NetBeansConfigurationDynamicProvider implements vscode.DebugConfigurationP
return [];
}
let result: vscode.DebugConfiguration[] = [];
const attachConnectors: DebugConnector[] | null | undefined = await vscode.commands.executeCommand(extCommands.attachDebugger);
const attachConnectors: DebugConnector[] | null | undefined = await vscode.commands.executeCommand(extCommands.attachDebuggerConfigurations);
if (attachConnectors) {
for (let ac of attachConnectors) {
const debugConfig: vscode.DebugConfiguration = {
Expand All @@ -163,7 +163,7 @@ class NetBeansConfigurationDynamicProvider implements vscode.DebugConfigurationP
let defaultValue: string = ac.defaultValues[i];
if (!defaultValue.startsWith("${command:")) {
// Create a command that asks for the argument value:
let cmd: string = `${extCommands.attachDebugger}.${ac.id}.${ac.arguments[i]}`;
let cmd: string = `${extCommands.attachDebuggerConnector}.${ac.id}.${ac.arguments[i]}`;
debugConfig[ac.arguments[i]] = "${command:" + cmd + "}";
if (!commandValues.has(cmd)) {
commandValues.set(cmd, ac.defaultValues[i]);
Expand Down

0 comments on commit 0397061

Please sign in to comment.