# Use Visual Studio Code for your Particle development needs

**URL:** <https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095>\
**Category:** Tutorials\
**Created:** [September 26, 2016, 1:00pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095 "2016-09-26T13:00:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [September 26, 2016, 1:00pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/1 "2016-09-26T13:00:51Z")

</div>

Hey,  
if you are a fan of Visual Studio Code I wrote an article on how to use it to build and flash your Particles [in Hackster](https://www.hackster.io/gusgonnet/use-visual-studio-code-for-your-particle-development-needs-9e23bc):  
[![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/6/63ff844d78157fd3b4c0060f2fd65cb6bc9395b4.jpg)](https://www.hackster.io/gusgonnet/use-visual-studio-code-for-your-particle-development-needs-9e23bc)

> **[Use Visual Studio Code for your Particle Development Needs](https://www.hackster.io/gusgonnet/use-visual-studio-code-for-your-particle-development-needs-9e23bc)**
>
> Use this lightweight, cross-platform editor while developing Particle software. By Gustavo Gonnet.

enjoy!  
Gustavo.

---

<div class="post-metadata">

**Author:** ![YbuQc](https://avatars.discourse-cdn.com/v4/letter/y/5f9b8f/32.png) [@YbuQc](https://community.particle.io/u/YbuQc)\
**Post date:** [October 4, 2016, 7:24pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/2 "2016-10-04T19:24:13Z")

</div>

Looks pretty good !  
The only drawback is that I can’t configure the include path…  
I updated my c\_cpp\_properties.json file with the following:

```
[...]
"includePath": ["c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
    "D:/Projects/Dev_WTY" ]
[...]

```

where the second path is where I stored the libs like OneWire. I’m still getting the message :

```
TemperatureSensorDS18XX.h:24:29: fatal error: OneWire/OneWire.h: No such file or directory
#include "OneWire/OneWire.h"

```

and of course, the file exists as D:/Projects/Dev\_WTY/OneWire/OneWire.h

Any clues ?

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [October 5, 2016, 2:50am UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/3 "2016-10-05T02:50:32Z")

</div>

Hi, are you getting that error when you try to compile? It so, I read somewhere that the particle CLI does not support include files, so you have to create soft links or copy all the lib files to the dir where you have your ino file.  
Hope it helps,  
Gustavo

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 5, 2016, 11:11am UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/4 "2016-10-05T11:11:12Z")

</div>

CLI does allow for subdirectories but your include statements need to be flat

```cpp
//#include "OneWire/OneWire.h"
// needs to be
#include "OneWire.h"

```

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [October 5, 2016, 2:20pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/5 "2016-10-05T14:20:15Z")

</div>

thanks @ScruffR!  
So @YbuQc, maybe you should copy (or softlink) the directories of your libraries to the project folder, and flatten your include statements as ScruffR mentioned in his post below.  
Let us know how it goes…  
Gustavo.

---

<div class="post-metadata">

**Author:** ![YbuQc](https://avatars.discourse-cdn.com/v4/letter/y/5f9b8f/32.png) [@YbuQc](https://community.particle.io/u/YbuQc)\
**Post date:** [October 6, 2016, 9:21pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/6 "2016-10-06T21:21:04Z")

</div>

It’s indeed working if I perform a brutal copy.

Too bad, but for me it’s a no go. There is no way I will modify my code to accommodate a specific tool. It’s a shame as Visual Studio Code looks pretty nice and fun to play with. I’d lik to be able to use my code in either web IDE or a local tool, and this can’t be done right now.

Thanks @ScruffR and @gusgonnet for your help.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 7, 2016, 4:51am UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/7 "2016-10-07T04:51:20Z")

</div>

That issue with needing to cater for different tools seperately will be sorted with Libraries 2.0 and IDEs 2.0, which also make importing other libraries a lot easier.

---

<div class="post-metadata">

**Author:** ![YbuQc](https://avatars.discourse-cdn.com/v4/letter/y/5f9b8f/32.png) [@YbuQc](https://community.particle.io/u/YbuQc)\
**Post date:** [October 9, 2016, 8:12pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/8 "2016-10-09T20:12:42Z")

</div>

Thanks for the info @ScruffR, that’s a very good news! Can’t wait to use IDEs 2.0 😉

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [October 11, 2016, 6:41pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/9 "2016-10-11T18:41:51Z")

</div>

getting curious now where you got that info and when is the ETA for IDE 2.0 😐

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 11, 2016, 7:19pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/10 "2016-10-11T19:19:36Z")

</div>

@gusgonnet, as Elites we do get some peeks behind the scenes what’s going on and coming up and one of the bigger tasks Particle is currently working on is this Library 2.0 which is already undergoing some “early beta” testing and is a basis for IDE 2.0.  
There is no official ETA but it’s rather high on the prority list.

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [October 12, 2016, 8:41pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/11 "2016-10-12T20:41:05Z")

</div>

> [@ScruffR](#):
>
> as Elites we do get some peeks behind the scenes what's going on and coming up

cool! that's what I want to be when I grow up!!! 😛  
thanks

---

<div class="post-metadata">

**Author:** ![chrissy](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@chrissy](https://community.particle.io/u/chrissy)\
**Post date:** [October 20, 2016, 3:24pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/12 "2016-10-20T15:24:49Z")

</div>

Please add [these instructions](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation/26635) to the tutorial to get OTA flashing to work with the Electron. Thanks!

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [October 20, 2016, 5:02pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/13 "2016-10-20T17:02:22Z")

</div>

done, many thanks for the suggestion!

---

<div class="post-metadata">

**Author:** ![naikrovek](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/naikrovek/32/4162_2.png) [@naikrovek](https://community.particle.io/u/naikrovek)\
**Post date:** [April 4, 2017, 4:25pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/14 "2017-04-04T16:25:33Z")

</div>

Is this guide still accurate? I have lots of build issues when I try this. I guess it might be the IDE naming everything with a .ino extension and VSCode naming everything with a .cpp extension. I know there are caveats when switching between them, but I don’t know what they are. VSCode won’t flippin’ tell me. Compiling just tells me everything is SUPER WRONG

Actually, before that, is there **any** IDE environment that shows code problems inline, before you compile, for Particle devices? Compiling simply to check for errors is … non-optimal and only minimally helpful.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 4, 2017, 5:05pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/15 "2017-04-04T17:05:31Z")

</div>

If `.ino` poses a problem, just use `.cpp` and add `#include <Particle.h>` and function prototypes in all your `.cpp` files.

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [April 4, 2017, 5:18pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/16 "2017-04-04T17:18:40Z")

</div>

still valid. I’ve been using it almost every day for the last 5 months.  
if you include a library please flatten the directory structure so all lib files (.cpp and .h) are next to your .ino files.  
Gustavo.

---

<div class="post-metadata">

**Author:** ![naikrovek](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/naikrovek/32/4162_2.png) [@naikrovek](https://community.particle.io/u/naikrovek)\
**Post date:** [April 4, 2017, 5:38pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/17 "2017-04-04T17:38:58Z")

</div>

> [@gusgonnet](#):
>
> flatten the directory structure

Do I have to flatten all of the Particle headers also?

Before I even attempt to collect all of those things and put them in one place, does this IDE show you compilation errors **before you compile** like any other IDE made in the past 20 years?

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [April 4, 2017, 5:53pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/18 "2017-04-04T17:53:32Z")

</div>

> [@naikrovek](#):
>
> Do I have to flatten all of the Particle headers also?

not sure what you meant. If those headers are included in the libs your proj is using then the answer is yes.

> [@naikrovek](#):
>
> does this IDE show you compilation errors before you compile

nope

---

<div class="post-metadata">

**Author:** ![naikrovek](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/naikrovek/32/4162_2.png) [@naikrovek](https://community.particle.io/u/naikrovek)\
**Post date:** [April 4, 2017, 6:08pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/19 "2017-04-04T18:08:24Z")

</div>

Are there any IDEs at all that do show compile errors before you build?

This is a basic thing I’m asking for. Just basic syntax validation and rudimentary type checking.

````auto
double radians(double deg);```

it's pointing at the 2nd ```double```, not the first. that formatting is lost here.

I have dozens of compile errors like that. This code compiles fine on the Web "IDE"
````

---

<div class="post-metadata">

**Author:** ![naikrovek](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/naikrovek/32/4162_2.png) [@naikrovek](https://community.particle.io/u/naikrovek)\
**Post date:** [April 4, 2017, 9:25pm UTC](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/20 "2017-04-04T21:25:14Z")

</div>

Sorry that I sound super whiney, I’m having a bad day and am very frustrated with getting anything “off-road” working on this platform. The paved route is very well done, manicured, well-kept, etc. One step off that path and you are in the weeds.

[Next page](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095.md?page=2)
