From 70bcb5d0461a4d9450a168b8c5d7f9ada56cd0ef Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Fri, 26 Jul 2024 10:13:04 +0200 Subject: [PATCH] Rename debugger type to avoid conflicting with proper "gdb" --- package.json | 8 ++++---- src/extension.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 365d467..84f41e5 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ ], "debuggers": [ { - "type": "gdb", + "type": "superbol-gdb", "languages": ["cobol", "COBOL"], "program": "./out/src/gdb.js", "runtime": "node", @@ -187,7 +187,7 @@ "description": "New SuperBOL launch request", "body": { "name": "${2:SuperBOL: debug launch}", - "type": "gdb", + "type": "superbol-gdb", "request": "launch", "target": "$${_:{file}}", "arguments": "", @@ -203,7 +203,7 @@ "description": "New SuperBOL attach local request", "body": { "name": "${2:SuperBOL: debug attach local}", - "type": "gdb", + "type": "superbol-gdb", "request": "attach", "pid": "${3:0}", "target": "$${_:{file}}", @@ -218,7 +218,7 @@ "description": "New SuperBOL attach remote request", "body": { "name": "${2:SuperBOL: debug attach remote}", - "type": "gdb", + "type": "superbol-gdb", "request": "attach", "remoteDebugger": "${3:host:port}", "target": "$${_:{file}}", diff --git a/src/extension.ts b/src/extension.ts index 586158a..2557837 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -11,8 +11,8 @@ const COBOL_RESERVED_WORDS = ["perform", "move", "to", "set", "add", "subtract", export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( - vscode.debug.registerDebugConfigurationProvider('gdb', new GdbConfigurationProvider()), - vscode.debug.registerDebugAdapterDescriptorFactory('gdb', new GdbAdapterDescriptorFactory(new CoverageStatus(), new GDBDebugSession())), + vscode.debug.registerDebugConfigurationProvider('superbol-gdb', new GdbConfigurationProvider()), + vscode.debug.registerDebugAdapterDescriptorFactory('superbol-gdb', new GdbAdapterDescriptorFactory(new CoverageStatus(), new GDBDebugSession())), vscode.languages.registerEvaluatableExpressionProvider('GnuCOBOL', new GnuCOBOLEvalExpressionFactory()), vscode.languages.registerEvaluatableExpressionProvider('GnuCOBOL31', new GnuCOBOLEvalExpressionFactory()), vscode.languages.registerEvaluatableExpressionProvider('GnuCOBOL3.1', new GnuCOBOLEvalExpressionFactory()), @@ -33,7 +33,7 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider { config.name = "SuperBOL: default debug"; } if (config.type === undefined) { - config.type = "gdb"; + config.type = "superbol-gdb"; } if (config.request === undefined) { config.request = "launch"; @@ -79,7 +79,7 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider { vscode.ProviderResult { const launchConfigDefault: vscode.DebugConfiguration = { name: "SuperBOL: debug (launch)", - type: "gdb", + type: "superbol-gdb", request: "launch", preLaunchTask: "SuperBOL: build (debug)", target: "${file}", @@ -93,7 +93,7 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider { const attachLocalConfiguration: vscode.DebugConfiguration = { name: "SuperBOL: debug (attach local)", - type: "gdb", + type: "superbol-gdb", request: "attach", pid: "${input:pid}", target: "${file}", @@ -105,7 +105,7 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider { const attachRemoteConfiguration: vscode.DebugConfiguration = { name: "SuperBOL: debug (attach remote)", - type: "gdb", + type: "superbol-gdb", request: "attach", "remote-debugger": "${input:remote-debugger}", target: "${file}",