Noob here. How do I link the online IDE to a compiler/interpreter and its libraries?

Say if I want to add Elixir, ASM or another language. How would I go about doing it?

I have had a look at the extension repository for the C++ and I can’t seem to find where the compiler
executable is being called.

Also if I have have a very specific build chain that I want all my team to use libs, compiler/interpreter flags and very specific version can I do that?

Thanks :slight_smile:

@SuperPauly thank you for the discussion :+1:

Say if I want to add Elixir, ASM or another language. How would I go about doing it?

The idea would be to include/use the appropriate vscode extension (plugin) with your application (ex: elixir). You can either include these extensions as “builtin” where they are part of your application by default (build time), or you can let your end-users install them at runtime.

For “builtin” extensions you can refer to the following section.

Also if I have have a very specific build chain that I want all my team to use libs, compiler/interpreter flags and very specific version can I do that?

That would be specific to how you consume or deploy your application. If for example you use docker you will need to ensure the environment is set up correctly.

We have some examples under theia-apps if you’d like to look at example docker images for reference:

You could download the vscode-cpptools extension and add it to your Theia plugins folder. The cpptools uses the launch.json and tasks.json to run Build and Debug. So, you need add the path of your compiler executable to the args or command fields of your tasks.json or launch.json such as:

tasks.json:

{
    "tasks": [
        {
            "label": "cmake",
            "command": "cmake",
            "type": "shell",
            "args": [
                ".",
                "-B",
                "build",
                "-DCMAKE_C_COMPILER=$CC",  
                "-DCMAKE_CXX_COMPILER=$CXX"
            ]
        },
        {
            "label": "make",
            "command": "make",
            "type": "shell",
            "dependsOn": "cmake",
            "args": [
                "-C",
                "build"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []
        }
    }
}

This tasks.json use the cmake to build my cpp project so I can specify my compiler via environment variables $CC and $CXX.

launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(lldb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb",
            "miDebuggerPath": "/path/to/your/debugger"
        }
    ]
}

This launch.json is generated from cpptools configuration template. You can specify your debugger via the miDebuggerPath but you need to note the word mi which means you need use a lldb-mi or gdb-mi to use the cpptools extension.