Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc16f9c

Browse filesBrowse files
committed
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.
1 parent 5382501 commit cc16f9c
Copy full SHA for cc16f9c

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/extension.ts

Copy file name to clipboardExpand all lines: src/extension.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async function startDebug(_: ExtensionContext, config: DebugConfig): Promise<boo
114114
}
115115
if (!rawStdout) {
116116
if (rawStdErr) {
117-
if (rawStdErr.indexOf('compiled sketch not found in') !== -1) {
117+
if (rawStdErr.toLowerCase().indexOf('compiled sketch not found in') !== -1) {
118118
vscode.window.showErrorMessage(`Sketch '${path.basename(config.sketchPath)}' was not compiled. Please compile the sketch and start debugging again.`);
119119
} else {
120120
vscode.window.showErrorMessage(rawStdErr);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.