From 41021604981e29a5573032f67c9a51d94e84cebf Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Fri, 22 Sep 2023 14:47:10 -0400 Subject: [PATCH] Add debugging to see what is arriving at parsing message --- src/GDBTargetDebugSession.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/GDBTargetDebugSession.ts b/src/GDBTargetDebugSession.ts index c54b8f01..eefe2bbf 100644 --- a/src/GDBTargetDebugSession.ts +++ b/src/GDBTargetDebugSession.ts @@ -236,10 +236,15 @@ export class GDBTargetDebugSession extends GDBDebugSession { ); } else { checkTargetPort = (data: any) => { - const regex = new RegExp( - target.serverPortRegExp - ? target.serverPortRegExp - : 'Listening on port ([0-9]+)' + const regexStr = target.serverPortRegExp + ? target.serverPortRegExp + : 'Listening on port ([0-9]+)'; + const regex = new RegExp(regexStr); + this.sendEvent( + new OutputEvent( + `checking '${data}' for /${regexStr}/`, + 'server' + ) ); const m = regex.exec(data); if (m !== null) {