-
Notifications
You must be signed in to change notification settings - Fork 4
Using the Framework with Visual Studio Code
Visual Studio Code is a very lightweight and useful IDE (text editor) for programming offered by Microsoft. It offers many great features that help us in our daily lives as programmers. If you are new to programming or C/C++, VS Code will make using the framework much less of a headache for you.
-
First, download and install VS Code. If you already have it, skip this step. Once that is done installing you will also need the C/C++ Extension for intellisense and code completion, which we will configure in the next steps.
-
For the rest of the setup, you will need to have created the skeleton project for your plugin OR the
code-mod-example
downloaded. Whatever you choose to do, open the folder in VS Code before continuing -
Press
Ctrl + shift + p
top open the command palette, then typeC/C++: Edit Configurations (JSON)
. You can also edit the configuration via the UI if that's more your style, but you wont be able to change the configuration name. -
Replace everything in the file with the code from the template below. You will need to change
/path/to/devkitpro
to your actual installation directory. On Windows, this defaults toC:/devkitPro
. For Linux, it's usually/opt/devkitpro
. -
You're done! There is still more that can be set up, such as setting up build tasks for
make
andclean
, but that isn't strictly necessary for writing plugins and we will cover that in a separate section. For now, VS Code has a built in command line that you can use tomake
andclean
so you don't need a CLI separate window open
{
"configurations": [
{
"name": "SaltySD Plugin",
"includePath": [
"${workspaceFolder}/code-mod-framework/framework/include/**",
"${workspaceFolder}/code-mod-framework/lib/libnx_min/nx/**",
"/path/to/devkitPro/devkitA64/aarch64-none-elf/include/**",
"/path/to/devkitPro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include/**",
"/path/to/devkitPro/libnx/include/**"
],
"defines": [
"SWITCH",
"__SWITCH__",
"DEBUG"
],
"compilerPath": "/path/to/devkitPro/devkitA64/bin/aarch64-none-elf-g++",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}