Using Visual Studio 2017 15.5 with Particle


#1

Starting with Visual Studio 2017 version 15.5 (currently only in Preview), you can use many of the features of Microsoft Visual Studio with Particle firmware. Things like IntelliSense work, as do features like refactoring and all sorts of linking between things in source and system firmware headers.

It’s not perfect yet, but it’s quite cool. And it works with the free Community edition. No local build or GDB yet, but those are theoretically possible, I just had trouble getting them to work and I thought I’d release just this part, because even this part is pretty awesome.

The full and lengthy instructions can be found here:

What can do you do with it? I’m glad you asked.

  • Flagging of common code errors like undefined references while you type. You don’t even need to save, let alone build!

  • Also things like too many arguments, for both your code and system firmware, as you type.

  • Autocomplete, for both system firmware and your code. In this example, I typed Serial.b and it helpfully provided lots more info:

16autocomplete

  • Quick link to declaration (header file) and definition (source file). You can view all of the system firmware headers, but unfortunately not the implementations (since the whole system firmware is not indexed by IntelliSense).

17definitionanddeclaration

  • Class View for easily navigating all your classes

  • Find all references. Click on source or the class view and find out where it’s used. I selected it for DS2482GetTemperatureForListCommand and found it used in 3 examples and the regular source.

  • Hover over constants, both in your own source and system firmware.

  • For libraries with inline documentation, hovering over the class name brings up helpful information.

21hoverdoxygen

  • Rename a class, method or function in a few clicks. It finds all of the places to fix in all files (including my example files) and also finds comments that probably need to be changed!


  • Automatic graying out of code controlled by defines, even platform defines:

  • You get a bunch of new options when you right click on a .cpp file in the Solution Explorer:

  • You can build and flash by DFU with one menu selection, great for Electrons:

  • Build output fully integrated into the normal Visual Studio flow. Errors link into the error panel and into the code automatically.


ECLIPSE setup for local build with full code analysis and debugging
#2

As always thank you for the hard work!


#3

This is a fantastic feature and I am now dependent on it, any chance it can reap the benefits of the offline compile recently released for Visual Studio Code?

(I did the Visual Studio Code Particle install , but I dont like the V.S. Code UI, am used to classic Visual Studio and don’t want to switch)


Visual Studio 2017 offline compile availability?
#4

By the lack of response, can we assume mesh and offline compile support for Visual Studio 2017 has been abandonded?


#5

I don’t think there ever was official support for VS2017. With VS Code being the new official IDE, that’s where it’s at right now. I think it’s unlikely that additional resources will be spent on alternative IDEs, for the foreseeable future.