You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
I'm working on a sketch which uses some of my own libraries. In one of the libraries there was an error inside a template in a header file. The header was included in the sketch and the template instantiated. IntelliSense is working for the sketch – but it doesn't show the errors in the library. Okay, this may be the desired behaviour.
I see the errors when doing a build/verify. But now trouble starts. Since the plug-in doesn't use VS Code's task system, none of the standard problem matchers is attached to the build output. The plug-in code shows some custom parsing of the output (
The incorporated gcc shows its warnings and errors including file and position. I'd expect to be able to jump to the specific file from the emitted compiler output – the output must be hot-linked! This may be a hard task so at least I'd expect an entry in the Problems tab of VS Code. This can't be to hard since IntelliSense is providing parsed compiler output when typing inside the sketch. At the moment I have to open the error in the library myself – including path traversing to the mentioned file. No simple click like in other IDEs.
So please extend your own parsing. By the way with a suitable problem matcher/parser, long standing issues like #1215 or #1283 could be solved. Just store the sketch size during parsing of output and repeat it at the end of the run.
A much more easier solution would be to trash your own build handling and rely on VS Code's task system with the already existing problem matcher "$gcc". Instead of doing the build or upload with privately spawned shells just create a suitable task file ("tasks.json") with all needed settings. The plug-in does the same when creating "c_cpp_properties.json" for IntelliSense support. How hard can it be to create a tasks.json with tasks like "Build sketch" and "Upload sketch"?
The text was updated successfully, but these errors were encountered:
aheyer
changed the title
Intellisense doesn't show library errors Or Use VS Code's task system with a problem matcher
IntelliSense doesn't show library errors Or Use VS Code's task system with a problem matcher
Nov 9, 2021
I'm working on a sketch which uses some of my own libraries. In one of the libraries there was an error inside a template in a header file. The header was included in the sketch and the template instantiated. IntelliSense is working for the sketch – but it doesn't show the errors in the library. Okay, this may be the desired behaviour.
I see the errors when doing a build/verify. But now trouble starts. Since the plug-in doesn't use VS Code's task system, none of the standard problem matchers is attached to the build output. The plug-in code shows some custom parsing of the output (
vscode-arduino/src/arduino/arduino.ts
Line 716 in 096fecb
The incorporated gcc shows its warnings and errors including file and position. I'd expect to be able to jump to the specific file from the emitted compiler output – the output must be hot-linked! This may be a hard task so at least I'd expect an entry in the Problems tab of VS Code. This can't be to hard since IntelliSense is providing parsed compiler output when typing inside the sketch. At the moment I have to open the error in the library myself – including path traversing to the mentioned file. No simple click like in other IDEs.
So please extend your own parsing. By the way with a suitable problem matcher/parser, long standing issues like #1215 or #1283 could be solved. Just store the sketch size during parsing of output and repeat it at the end of the run.
A much more easier solution would be to trash your own build handling and rely on VS Code's task system with the already existing problem matcher "$gcc". Instead of doing the build or upload with privately spawned shells just create a suitable task file ("tasks.json") with all needed settings. The plug-in does the same when creating "c_cpp_properties.json" for IntelliSense support. How hard can it be to create a tasks.json with tasks like "Build sketch" and "Upload sketch"?
The text was updated successfully, but these errors were encountered: