/**
 * @file extensions.libjsonnet
 * @namespace vscode::launch
 * @brief Generate `launch.json` content for Visual Studio Code.
 */
{
  /**
   * Generate `launch.json` content for Visual Studio Code.
   * @param settings The project settings.
   * @returns An object representing the `launch.json` content.
   * @pt object
   * @rv object
   */
  get(settings):: {
    configurations: if settings.project_type == 'python' then [
      {
        args: ['-x'],
        autoReload: {
          enable: true,
        },
        console: 'integratedTerminal',
        env: {
          _PYTEST_RAISE: '1',
        },
        justMyCode: false,
        module: 'pytest',
        name: 'Run tests',
        request: 'launch',
        type: 'debugpy',
      },
    ] else [],
    inputs: [],
    version: '0.2.0',
  },
}
