From cc16f9cdf5e8474f62d68b5c58dc5d715011ad76 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 3 Feb 2022 22:24:02 -0800 Subject: [PATCH] Update check on debug config generation fail When sketch debugging is initiated, the extension runs Arduino CLI to get the debugger configuration information. This information is required to generate the `launch.json` configuration file. As part of this information is the path to the compiled sketch binary, Arduino CLI checks for the existence of that file, and errors if it is not present (which is usually caused by the user having neglected to compile the sketch): ``` Error getting Debug info: Compiled sketch not found in ... ``` The extension has special handling for this specific common error cause, which is based on a fragile string comparison on the human readable error message. As is the nature of this approach, a seemingly innocuous capitalization change to the message in the Arduino CLI code base broke the check. The quick fix provided here is making the check case insensitive. --- src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index d07fb03..1f6782e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -114,7 +114,7 @@ async function startDebug(_: ExtensionContext, config: DebugConfig): Promise