Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Visual Studio Code and Ultra App Kit on Windows

Before doing anything I want to use Visual Studio Code in Windows instead of Visual Studio. The reason is that I'm already using Visual Studio Code for some other things and really like it and don't feel that installing Visual Studio just for compiling my Ultra App Kit development is something that I want to do. I got that working and will here describe how I did that. Maybe there's better ways, just give suggestions in that case. Anyway here we go then.

I assume that you have he Ultra App Kit and Visual Studio Code installed already (no need for anything else at first)

Installing C++ support in Visual Studio Code

Open Visual Studio Code, press Ctrl+Shif+X. This will bring upp available extensions. Type C++ in the search box and install C/C++ by Microsoft.



Installing Build Tools for Visual Studio 2019

Next thing is to install the Build Tools needed. Head over to Microsoft Visual Studio Downloads, scroll down and download the Build Tools and install them. No Visual Studio needed.



Create your Ultra Kit App

Create an Ultra Kit App. In my case I created a 'DrawBuddy' app. Then open Visual Studio Code and type Ctrl+K Ctrl+O to select the created app folder.



Next select 'File' and 'Save Workspace As'. I'm using the same name as the app for the workspace. You can name anything you want.



Hiding files that's of no interest for the project

You will find a lot of files in the explorer that are of no interest for creating code and compiling.


Personally I hide those files as I find that they just clutter up things. Such files are DLL's, Mac and Linux things and some other stuff. To hide those things open the file called 'DrawBuddy.code-workspace' in the editor and add following directly below the "files.associations" block (don't forget a comma)

"files.exclude": {
            "**/.vs/": true,
            "**/*.dll": true,
            "**/*.dylib": true,
            "**/*.entitlements": true,
            "**/*.ilk": true,
            "**/*.mm": true,
            "**/*.obj": true,
            "**/*.pdb": true,
            "**/*.props": true,
            "**/*.sln": true,
            "**/*.so": true,
            "**/*.vcx*": true,
            "**/*.xc*": true,
            "**/*.xcode*": true,
            "**/*.xib": true,
            "**/Info.*": true,
            "**/makefile": true,
            "**/Plugins/": true,
            "**/x64/": true,
            "**/x86/": true,
            "**/AppDelegate.h": true

After doing that you will get a more clear view on the files to bother about. 



Adding support for building the project

In order to compile and link we need to add some json files to the project. To make life easy I have provide them here:

Compiling and linking. 

Depending on you installation you may have to change the CL.EXE path in this line

"command": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe",

By default the resulting executable is created in the project folder with the same name as the project folder. If you project is in MyProject, the executable will get the name MyProject.exe. You may change this to whatever you want by editing the line 

// Executable

Debugging and runnning.
If you have changed the name of the executable in tasks.json you need to change this line also

 "program": "${workspaceFolder}\\${workspaceFolderBasename}.exe",

Some general settings for C++ development

Here you may have to change the version number of the Windows SDK

"windowsSdkVersion": "10.0.19041.0",


Build project 

In order to compile and link you just have to press Ctrl+Shift+B at anytime and you will get a popup where you can select what to compile.


The last alternative 'detected task' I haven't bothered setting up, so select either 'Build Debug' or 'Build Release'. If you need to add support for just compiling current source file the detected alternative is you choice, however then you must set it up in the tasks.json more or less in the same way as for the other alternatives.

You will get the compiler output in a terminal windows like this




Debugging is easy. Just set your breakpoints and press F5



Hope this was helpful.


tasks.json c_cpp_properties.json launch.json



  • Like 3


Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...