Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Get Started

Thiago 'Jedi' Abreu edited this page Nov 2, 2017 · 5 revisions

Vala is a programming language very similar to C#, using the GObject system and compiles to C. This means you can have a lot of performance and access to native libs with a very familiar syntax.

This extension helps you to use the great editor VS Code with this wonderful language.

Install

In the VS Code, open your command palette and type ext install vala

That simple.

Debug

You can debug you Vala code with GDB debugger (or one of its front-ends, like Native Debug Extension) if you pass the correct flag to the compiler. Here's a sample task.json file to help you get started. Adapt it for your needs.

    {
        "version": "2.0.0",
        "command": "valac",
        "args": [
            // Pass your files here
            "/full/path/to/gtk-hello.vala", 
            // And your dependencies
            "--pkg=gtk+-3.0"
        ],
        "suppressTaskName": true,
        "problemMatcher": [
            "$valac"
        ],
        "tasks": [
            {
                "taskName": "Compile w/ Debug",
                "args": [
                    "-g"
                ],
                "group": {
                    "kind": "build",
                    "isDefault": true
                }
            },
            {
                "taskName": "Compile w/ Debug and C files",
                "args": [
                    "-g",
                    "--save-temps"
                ]
            },
            {
                "taskName": "Compile Release"
            }
        ]
    }
Clone this wiki locally