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.
Copy file name to clipboardExpand all lines: BRANCHNOTES.md
+12-5
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Provide a configuration flag which allows the user to turn this feature off - th
18
18
### Status
19
19
**2020-02-05** Currently I'm able to generate error free IntelliSense setups for AVR and ESP32 using the preliminary implementation. For ESP32 I just had to add the intrinsic compiler paths manually. A solution has to be found for these ... which there is, see [here](https://stackoverflow.com/a/6666338)
20
20
**2020-02-06** Got it fully working (with built-in include directories) for AVR, ESP32, ESP8266. Rewrote the backend to facilitate writing of further parser engines in the future.
21
+
**2020-02-07** Wrote compiler command parser npm package [cocopa](https://www.npmjs.com/package/cocopa) and began writing a test framework for it. Added a global configuration switch which allows the IntelliSense configuration generation to be turned off.
22
+
**2020-02-08** Integrated `cocopa` into vscode-arduino. Added project configuration flag which can override the global flag in both ways (forced off, forced on). Made code tslint compliant. Began some documentation in [README.md](README.md)
21
23
22
24
|| Tasks |
23
25
|-----:|:--------|
@@ -35,17 +37,17 @@ Provide a configuration flag which allows the user to turn this feature off - th
35
37
||:white_check_mark: Write configuration on change only |
36
38
||:white_check_mark: Option to backup old configurations? |
37
39
|**Configuration flags**|:heavy_check_mark: Provide global disable flag for IntelliSense auto-config |
38
-
||:white_check_mark: Provide project specific override for the global flag - most users will likely use the default setup and disable auto-generation for very specific projects |
40
+
||:heavy_check_mark: Provide project specific override for the global flag - most users will likely use the default setup and disable auto-generation for very specific projects |
||:heavy_check_mark: Querying of compiler built-in includes (Note: to be changed to generic compiler such that Arduino is not necessary for unit testing) |
41
43
||:white_check_mark: Throwing arbitrary data at parser engines |
42
44
||:white_check_mark: JSON input |
43
45
||:white_check_mark: JSON output |
44
46
||:white_check_mark: Configuration merging |
45
47
|**General**|:white_check_mark: Review and remove previous attempts messing with `c_cpp_properties.json` or IntelliSense. (Partially done - documented in the [General Tasks](#General-Tasks) section |
46
-
||:white_check_mark: Auto-run verify after setting a boardto generate a valid `c_cpp_properties.json`, identify other occasions where this applies (usually when adding new libraries), hint the user to run *verify*? -> Good moment would be after the workbench initialization -> message in arduino channel |
47
-
||:white_check_mark: Document configuration settings in [README.md](README.md)|
48
-
||:white_check_mark: Document features in [README.md](README.md)|
48
+
||:white_check_mark: Auto-run verify after a) *setting a board* b) *changing the sketch*. We have to generate a valid `c_cpp_properties.json` to keep IntelliSense working in such situations. Identify other occasions where this applies (usually when adding new libraries), hint the user to run *verify*? -> Good moment would be after the workbench initialization -> message in arduino channel |
49
+
||:heavy_check_mark: Document configuration settings in [README.md](README.md)|
50
+
||:white_check_mark: Document features in [README.md](README.md)(partially done) |
49
51
||:white_check_mark: How to handle compilation failure? Only set if more comprehensive |
50
52
||: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)|
51
53
||:white_check_mark: Finally: go through my code and look for TODOs |
@@ -67,7 +69,7 @@ I will list every supporter here, thanks!
Copy file name to clipboardExpand all lines: README.md
+11-1
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,7 @@ This extension provides several commands in the Command Palette (<kbd>F1</kbd> o
67
67
|`arduino.disableTestingOpen`| Enable/disable automatic sending of a test message to the serial port for checking the open status. The default value is `false` (a test message will be sent). |
68
68
|`arduino.skipHeaderProvider`| Enable/disable the extension providing completion items for headers. This functionality is included in newer versions of the C++ extension. The default value is `false`.|
69
69
|`arduino.defaultBaudRate`| Default baud rate for the serial port monitor. The default value is 115200. Supported values are 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400 and 250000 |
70
+
|`arduino.disableIntelliSenseAutoGen`| When `true` vscode-arduino will not auto-generate an IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`) by analyzing Arduino's compiler output. |
70
71
71
72
The following Visual Studio Code settings are available for the Arduino extension. These can be set in global user preferences <kbd>Ctrl</kbd> + <kbd>,</kbd> or workspace settings (`.vscode/settings.json`). The latter overrides the former.
72
73
@@ -98,7 +99,8 @@ The following settings are as per sketch settings of the Arduino extension. You
98
99
"board": "adafruit:samd:adafruit_feather_m0",
99
100
"output": "../build",
100
101
"debugger": "jlink",
101
-
"prebuild": "bash prebuild.sh"
102
+
"prebuild": "bash prebuild.sh",
103
+
"disableIntelliSenseAutoGen": "global"
102
104
}
103
105
```
104
106
-`sketch` - The main sketch file name of Arduino.
@@ -107,6 +109,14 @@ The following settings are as per sketch settings of the Arduino extension. You
107
109
-`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.
108
110
-`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.
109
111
-`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.
112
+
-`disableIntelliSenseAutoGen` - Override the global auto-generation of the IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`). Three options are available:
113
+
-`"global"`: Use the global settings (default)
114
+
-`"disable"`: Disable the auto-generation even if globally enabled
115
+
-`"enable"`: Enable the auto-generation even if globally disabled
116
+
117
+
## IntelliSense
118
+
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.
119
+
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).
110
120
111
121
## Debugging Arduino Code <sup>preview</sup>
112
122
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.
Copy file name to clipboardExpand all lines: misc/arduinoValidator.json
+11-1
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,16 @@
32
32
"description": "Arduino Debugger Settings",
33
33
"type": "string",
34
34
"minLength": 1
35
+
},
36
+
"disableIntelliSenseAutoGen": {
37
+
"description": "Disable/enable the automatic generation of the IntelliSense configuration file (c_cpp_properties.json) for this project (overrides the global setting). When set to \"global\" the global extension settings will be used.",
0 commit comments