3.1.41.2.21. waf_tools.vscode.process_vscode

waf_tools.vscode.process_vscode(self: task_gen) → None

Process the vscode feature on a task generator.

This is the main hook for VS Code workspace generation. For each task generator with the vscode feature it:

  1. Checks that the current build variant is in VSCODE_ALLOWED_VARIANTS.

  2. Validates the JSON templates in tools/ide/vscode/.

  3. Creates the target .vscode directory and copies the variant’s template files into it.

  4. Optionally switches the build environment to the one specified by the environment attribute.

  5. Patches c_cpp_properties.json via build_c_cpp_properties().

  6. Patches settings.json via build_settings().

  7. Patches tasks.json via build_tasks() (if build_tasks is set).

  8. Patches launch.json via build_launch() (if build_launch is set).

Required task generator attributes:
  • target: The VS Code workspace variant name (must match a subdirectory in tools/ide/vscode/).

  • vscode_dir (Node): The output .vscode directory node.

Optional task generator attributes:
  • environment (str): Waf environment name to switch to before resolving compiler defines and includes.

  • build_tasks (bool): Whether to patch tasks.json.

  • build_launch (bool): Whether to patch launch.json.