vscode(Visual Studio Code) + oF


If anyone wants to help adding official support for vscode the PG architecture is pretty straightforward:

You just need to create a new class for vs projects here:

take a look at the qtcreator project which is probably the simplest right now.

Once that’s there it could be added as a new platform so it can be chosen as an option


Great work! But maybe I miss something – how is it possible to add addons to the project so that they compile?
I can see the addons folder in the workspace, I’ve also added the particular addon’s path to includePath and browse.path in c_cpp_properties.json, I’ve included the addon’s name in the addons.make file, but I’m still getting this when trying to build:

fatal error: ‘ofxOsc.h’ file not found
#include “ofxOsc.h”

I’m on OS 10.12.6 and oF 0.10.1 with C++ from Microsoft and C++ Intellisense installed. I’ve got no idea what could be done more. Please, help!


Hello slavo.

Please try this tutorial https://www.youtube.com/watch?v=TczI-tSOIpY
(033 ofxOsc input basics) or clone code from https://github.com/lewislepton/openFrameworksTutorialSeries/

I hope it helps

1 Like

ill give it a shot in theory i can just use the one from QTcreator and replace with VS CODE?


yes you can use it as a template


Hello, just started working on it.

Any suggestion, commits, help are appreciated.


I uploaded compiled alpha version on Google drive.
Currently only OSX app.
I will bake for Linux and Windows tomorrow.

How to

  1. Check README.txt
  2. unzip
  3. double click app
  4. select Visual Studio Code from dropdown list
  5. Please report here or github if something went wrong.

By the way the new release of VS code implements remote editing and debugging in various flavors, just having a peek at that now but it looks very promising


Oh nice, does it work with C++?
Do we need to add some lines to configuration file?

Once we add vscode support to PG, we can easily modify and test new feature by editing template files in /scripts/template/vscode.


According to the docs it should work, I had some issues but didn’t really try that hard. The blog post about the feature is here

[EDIT] Once tasks.json and launch.json are properly configured remote building and debugging works like a charm, you have all console messages in VScode terminal.

Just be careful to add

        "env": {"DISPLAY":":0"},

to the linux section of launch.json, so that OF application will be able to find and open the X11 display. Assuming that remote host is Linux, of course.


I can say that this is currently working for myself. it created & started up a viscose project - just trying a simple build & running of it

in many ways id love to cut out using Xcode. whilst its great for really heavy use & to test things with tools to measure memory etc. sometimes you just need something to run code :wink:

ill give an update if anything changes or if there are specific problems

is there any way to have a RunDebug setting. doing a build pops up with debug build, but not running

thanks again for this. great work :wink:

1 Like

Hit F5 key to start debugging.

1 Like

This is great! Is there any talk of getting this merged into the official PG repo ?


It’s already merged into latest master. The PR above is closed because we decided another solution(using template feature). Right now you can only generate vscode project via command line PG. After checkout latest master and install command line PG, try following cmd.
projectGenerator -o"your/oF/" -t"vscode" your/project

More details here


Thanks for your excellent work. It works great until I need an addon. When I compile I get the same ‘undefined reference to …’ egimage


I’ve added the addons into the addons.make file:

Any ideas?


Please try -a option of commandline PG and generate again.


I’ve tried -a option and it actually erased everything inside addons.make.


Try adding all name of addons you need like this

projectGenerator -o"youroF" -a"ofxGui ofxCv" -t"vscode" your/project

Please refer to this page for more about how to use Commandline PG


Hey, i´m trying to start with openframeworks but i can´t get it working with vs code.
i installed everything and it works with xcode. How do i install the commandline PG?
if i paste ‘projectGenerator -t"vscode" your/project’ into Terminal (in openframeworks root directory) it says
‘-bash: projectGenerator: command not found’