EOSIO C++ IntelliSense in VSCode

If you’re a developer nowadays chances are high that you’re using VSCode as your IDE of choice. It’s my favourite IDE for web development, but I also use it for C++ EOSIO smart contract development because it’s free, unlike the CLion alternative.

Per default, there is no IntelliSense (code completion, jump to class definitions, etc.) for EOSIO smart contract development which is a big productivity killer. However, there’s an easy way to enable it for your VSCode workspace.

  1. Install and enable the C/C++ IntelliSense Extension
  2. Edit C++ Configuration: CMD + SHIFT + P => C/C++: Edit Configuration (UI)
  3. In the Include paths sections add the path to your eosio.cdt include directories and optionally your whole worksapce folder. ${workspaceFolder}/** /usr/local/opt/eosio.cdt/opt/eosio.cdt/include/eosiolib/core/** /usr/local/opt/eosio.cdt/opt/eosio.cdt/include/eosiolib/contracts/**
  4. In the Defines section add definitions for uint128_t. (When I didn't add this I encountered error lines below each uint128_t.) uint128_t=__uint128_t int128_t=__int128_t
CPP Configuration

After reloading VSCode, you should be able to see the definitions when pressing CMD + clicking on expression:

EOSIO Intelli Sense
Learn EOS Development Signup

Written by

Full Stack Software Engineer #javascript #EOS. Into Recreational Math / CS 🤯 Just message me about anything, my mind is open.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store