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
Copy file name to clipboardExpand all lines: BRANCHNOTES.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ During merging I found some bugs within those functions - mainly due to the abov
69
69
70
70
**2020 02 17** Disabled and marked all previous implementations of IntelliSense support for later removal using `IS-REMOVE`. Pulled changes from upstream and merged them into the intellisense feature branch. Began to work on event handling/generation: vscode-arduino should detect when sketch/board/configuration and so on has changed, then re-analyze the current setup and set the IntelliSense configuration accordingly. This works more or less but there's a lot to fix in the current implementation which kept me busy till late today (I need some sleep now). Cleanup and commits follow tomorrow. Approaching alpha version for curious testers. OSX and Linux comes first, Windows will follow later.
71
71
**2020 02 18** Finished basic event triggering. Rewrote `DeviceContext` for proper settings modification detection (trigger events only on actual change) and generation of setting specific events (e.g. board changed) instead of one global event (aka. "something in the settings changed").
72
-
**2020 02 19** Implemented proper build scheduling for analysis build by writing an `AnalysisManager` class. This class collects multiple changes (e.g. board and configuration, which often are changed shortly after another) before running an analysis. In case another build or analysis is in progress it postpones newly filed analysis requests until the other build has completed.
72
+
**2020 02 19** Implemented proper build scheduling for analysis build by writing an `AnalysisManager` class. This class collects multiple changes (e.g. board and configuration, which often are changed shortly after another) before running an analysis. In case another build or analysis is in progress it postpones newly filed analysis requests until the other build has completed. Updated and completed the documentation for the IntelliSense usage within [README](README.md). Alpha test builds of the extension containing the latest implemented features and fixes are now available from the following [Dropbox folder](https://www.dropbox.com/sh/whmcdt26chyjgby/AAB1Ld2fzZ9Z_NfM3CRay17wa). Please note, that Windows is currently not supported yet.
73
73
74
74
## Status
75
75
|| Tasks |
@@ -103,7 +103,7 @@ During merging I found some bugs within those functions - mainly due to the abov
103
103
||:heavy_check_mark: Better build management such that regular builds and analyze builds do not interfere (done, 2020-02-19) `*`|
104
104
||:heavy_check_mark: Analyze task queue which fits in the latter (done, 2020-02-19) `*`|
105
105
||:heavy_check_mark: Document configuration settings in [README.md](README.md)|
106
-
||:white_check_mark: Document features in [README.md](README.md) (partially done) |
106
+
||:heavy_check_mark: Document features in [README.md](README.md)|
107
107
||:heavy_check_mark: Try to auto-generate even if verify (i.e. compilation) fails |
108
108
||:heavy_check_mark: Extract compiler command parser from vscode-arduino and [publish](https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c) it as a separate package which will allow reusage and easy testing without heavy vscode-arduino rucksack -- done, see [cocopa](https://www.npmjs.com/package/cocopa)|
109
109
||:heavy_check_mark: Parser only works when arduino is set to `verbose`, since this is the only way we get the compiler invocation command - this has to be fixed (done, see next item) |
Copy file name to clipboardExpand all lines: README.md
+14-8
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ The following settings are as per sketch settings of the Arduino extension. You
102
102
"output": "../build",
103
103
"debugger": "jlink",
104
104
"prebuild": "bash prebuild.sh",
105
-
"disableIntelliSenseAutoGen": "global"
105
+
"intelliSenseGen": "global"
106
106
}
107
107
```
108
108
-`sketch` - The main sketch file name of Arduino.
@@ -111,21 +111,27 @@ The following settings are as per sketch settings of the Arduino extension. You
111
111
-`output` - Arduino build output path. If not set, Arduino will create a new temporary output folder each time, which means it cannot reuse the intermediate result of the previous build leading to long verify/upload time, so it is recommended to set the field. Arduino requires that the output path should not be the workspace itself or in a subfolder of the workspace, otherwise, it may not work correctly. By default, this option is not set. It's worth noting that the contents of this file could be deleted during the build process, so pick (or create) a directory that will not store files you want to keep.
112
112
-`debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/master/misc/debuggerUsbMapping.json). By default, this option is not set.
113
113
-`prebuild` - External command before building the sketch file. You should only set one `prebuild` command. `command1 && command2` does not work. If you need to run multiple commands before the build, then create a script.
114
-
-`disableIntelliSenseAutoGen` - Override the global auto-generation of the IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`). Three options are available:
114
+
-`intelliSenseGen` - Override the global setting for auto-generation of the IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`). Three options are available:
115
115
-`"global"`: Use the global settings (default)
116
116
-`"disable"`: Disable the auto-generation even if globally enabled
117
117
-`"enable"`: Enable the auto-generation even if globally disabled
118
118
119
119
## IntelliSense
120
-
*TODO: Rewrite this section*
121
-
vscode-arduino auto-configures IntelliSense by default. vscode-arduino analyzes Arduino's compiler output during verify and generates the corresponding configuration file at `.vscode/c_cpp_properties.json` and tries as hard as possible to keep things up to date, e.g. running verify when switching the board or the sketch.
122
-
It doesn't makes sense though to run verify repeatedly. Therefore if the workspace reports problems (for instance after adding new includes to a new library) run *verify* such that IntelliSense knows of the new include directories (since the Arduino-backend performs the library resolution externally).
120
+
vscode-arduino auto-configures IntelliSense by default. vscode-arduino analyzes Arduino's compiler output by running a separate build and generates the corresponding configuration file at `.vscode/c_cpp_properties.json`. vscode-arduino tries as hard as possible to keep things up to date, e.g. it runs the analysis when switching the board or the sketch.
123
121
124
-
TODO: Note about configuration selection in lower right.
122
+
It doesn't makes sense though to run the analysis repeatedly. Therefore if the workspace reports problems ("squiggles") - for instance after adding new includes from a new library - run the analysis manually:
When the analysis is invoked manually it ignores any global and project specific disable.
128
+
129
+
### IntelliSense Configurations
130
+
vscode-arduino's analysis stores the result as a dedicated IntelliSense-configuration named `Arduino`. You have to select it from the far right of the status bar when you're in one of your source files as shown here:
This system allows you to setup and use own IntelliSense configurations in parallel to the automatically generated configurations provided through vscode-arduino. Just add your configuration to `c_cpp_properties.json` and name it differently from the default configuration (`Arduino`), e.g. `My awesome configuration` and select it from the status bar or via the command palette command **C/C++: Select a Configuration...**
129
135
130
136
## Debugging Arduino Code <sup>preview</sup>
131
137
Before you start to debug your Arduino code, please read [this document](https://code.visualstudio.com/docs/editor/debugging) to learn about the basic mechanisms of debugging in Visual Studio Code. Also see [debugging for C++ in VSCode](https://code.visualstudio.com/docs/languages/cpp#_debugging) for further reference.
0 commit comments