From 004e120112f64b62916b11f84668708a726ea2b1 Mon Sep 17 00:00:00 2001 From: xuhong Date: Fri, 31 May 2024 11:06:36 +0800 Subject: [PATCH 1/3] 1.fix implicitly type error --- src/backend/mi2/mi2.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/mi2/mi2.ts b/src/backend/mi2/mi2.ts index 706ae03..82e7ae6 100644 --- a/src/backend/mi2/mi2.ts +++ b/src/backend/mi2/mi2.ts @@ -33,7 +33,7 @@ class LogMessage { protected logReplaceTest = /{([^}]*)}/g; public logMsgBrkList: Breakpoint[] = []; - logMsgOutput(record){ + logMsgOutput(record:any){ if ((record.type === 'console')) { if(record.content.startsWith("$")){ const content = record.content; @@ -54,7 +54,7 @@ class LogMessage { } } - logMsgProcess(parsed){ + logMsgProcess(parsed:any){ this.logMsgBrkList.forEach((brk)=>{ if(parsed.outOfBandRecord[0].output[0][1] == "breakpoint-hit" && parsed.outOfBandRecord[0].output[2][1] == brk.id){ this.logMsgVar = brk?.logMessage; @@ -626,7 +626,7 @@ export class MI2 extends EventEmitter implements IBackend { return this.sendCommand("break-condition " + bkptNum + " " + condition); } - setLogPoint(bkptNum, command): Thenable { + setLogPoint(bkptNum:number, command:string): Thenable { const regex = /{([a-z0-9A-Z-_\.\>\&\*\[\]]*)}/gm; let m:RegExpExecArray; let commands:string = ""; From 2869f942a461410004199b4018849f0505766e2f Mon Sep 17 00:00:00 2001 From: xuhong Date: Fri, 31 May 2024 11:09:26 +0800 Subject: [PATCH 2/3] 1.fix gdb check error --- src/gdb.ts | 4 ++-- src/lldb.ts | 4 ++-- src/mago.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gdb.ts b/src/gdb.ts index 843fca2..ecc6c3c 100644 --- a/src/gdb.ts +++ b/src/gdb.ts @@ -55,7 +55,7 @@ class GDBDebugSession extends MI2DebugSession { protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void { const dbgCommand = args.gdbpath || "gdb"; - if (this.checkCommand(dbgCommand)) { + if (!this.checkCommand(dbgCommand)) { this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`); return; } @@ -101,7 +101,7 @@ class GDBDebugSession extends MI2DebugSession { protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void { const dbgCommand = args.gdbpath || "gdb"; - if (this.checkCommand(dbgCommand)) { + if (!this.checkCommand(dbgCommand)) { this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`); return; } diff --git a/src/lldb.ts b/src/lldb.ts index 718af1e..5db0bbe 100644 --- a/src/lldb.ts +++ b/src/lldb.ts @@ -49,7 +49,7 @@ class LLDBDebugSession extends MI2DebugSession { protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void { const dbgCommand = args.lldbmipath || "lldb-mi"; - if (this.checkCommand(dbgCommand)) { + if (!this.checkCommand(dbgCommand)) { this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`); return; } @@ -95,7 +95,7 @@ class LLDBDebugSession extends MI2DebugSession { protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void { const dbgCommand = args.lldbmipath || "lldb-mi"; - if (this.checkCommand(dbgCommand)) { + if (!this.checkCommand(dbgCommand)) { this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`); return; } diff --git a/src/mago.ts b/src/mago.ts index 411797d..df53e6d 100644 --- a/src/mago.ts +++ b/src/mago.ts @@ -51,7 +51,7 @@ class MagoDebugSession extends MI2DebugSession { protected override launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void { const dbgCommand = args.magomipath || "mago-mi"; - if (this.checkCommand(dbgCommand)) { + if (!this.checkCommand(dbgCommand)) { this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`); return; } @@ -75,7 +75,7 @@ class MagoDebugSession extends MI2DebugSession { protected override attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void { const dbgCommand = args.magomipath || "mago-mi"; - if (this.checkCommand(dbgCommand)) { + if (!this.checkCommand(dbgCommand)) { this.sendErrorResponse(response, 104, `Configured debugger ${dbgCommand} not found.`); return; } From 25e1f2876a07f96e21619fc0a432e824b3489dc8 Mon Sep 17 00:00:00 2001 From: xuhong Date: Wed, 21 Aug 2024 09:57:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?1=E3=80=81add=20changlog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27e01e4..521f9e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ Versioning]. ### Added +- fix gdb check error when debug beginning ([@henryriley0]) +- fix implicitly type error in log message when build vsix ([@henryriley0]) - check for configured debugger before start to provide a nicer error message ([@GitMensch]) @@ -242,6 +244,7 @@ Versioning]. [@gentoo90]: https://github.com/gentoo90 [@gitmensch]: https://github.com/GitMensch [@haronk]: https://github.com/HaronK +[@henryriley0]: https://github.com/HenryRiley0 [@jelleroets]: https://github.com/JelleRoets [@karljs]: https://github.com/karljs [@kvinwang]: https://github.com/kvinwang