Skip to content

Workspace

Antonio Davide edited this page Mar 3, 2023 · 4 revisions

Like in VSCode, a Workspace is a collection of files and folders. Every workspace provides task and launch settings along with its variables and configuration (eg. "Debug", "Release", etc).

This is a typical workspace folder layout:

- MyWorkspace
  - .automaton
      tasks.json
      launch.json
      variables.json
      config.json
      state.json
    main.c
    CMakeLists.txt

".automaton" folder structure

  • tasks.json: Compilers, Linters, Formatters or any other kind of executable/script can be specified here (see tasks.json)
  • launch.json: Provides DAP ready configurations
  • variables.json: All keys defined here are available as variables in tasks.json and launch.json under "ws" prefix (eg. ${ws.myvar})
  • config.json: A list of workspace related settings (eg. Debug or Release build") and available as variables in tasks.json and launch.json under "config" prefix (eg. ${ws.config})
  • state.json: It keeps the current workspace state. This file is autogenerated from config.json and managed by Automaton

Configuration load order

                 ┌───────────────────┐
                 │"Automaton Globals"│
                 └─────────┬─────────┘
                           │
                           ▼
                 ┌───────────────────┐ ...autogenerates... ┌────────────┐
                 │    config.json    ├────────────────────►│ state.json │
                 └─────────┬─────────┘                     └──────┬─────┘
                           │                                      │
                           │                                      ▼
                           │                            ┌───────────────────┐                             
                           └──────────────────────────► │   variables.json  │  
                                                        └─────────┬─────────┘
                                              ┌───────────────────┴───────────────────┐
                                              ▼                                       ▼
                                       ┌────────────┐                           ┌─────────────┐
                                       │ tasks.json │                           │ launch.json │
                                       └────────────┘                           └─────────────┘
Clone this wiki locally