{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "lldb",
      "request": "launch",
      "name": "Editor: Debug",
      "cargo": {
        "args": ["build", "-p", "editor", "--bin", "editor", "--features", "dev"],
        "filter": { "name": "editor", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": {
        "RUST_BACKTRACE": "1",
        "WGPU_VALIDATION": "0",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Editor: GPU validation",
      "cargo": {
        "args": ["build", "-p", "editor", "--bin", "editor", "--features", "dev"],
        "filter": { "name": "editor", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": {
        "RUST_BACKTRACE": "1",
        "WGPU_VALIDATION": "1",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Editor: SDR fallback",
      "cargo": {
        "args": ["build", "-p", "editor", "--bin", "editor", "--features", "dev"],
        "filter": { "name": "editor", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": {
        "RUST_BACKTRACE": "1",
        "BEVY_FPS_HDR": "0",
        "WGPU_VALIDATION": "0",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Editor: Release",
      "cargo": {
        "args": ["build", "--release", "-p", "editor", "--bin", "editor"],
        "filter": { "name": "editor", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": { "RUST_BACKTRACE": "1", "WGPU_VALIDATION": "0" },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Editor: Project root...",
      "cargo": {
        "args": ["build", "-p", "editor", "--bin", "editor", "--features", "dev"],
        "filter": { "name": "editor", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": ["--project", "${input:blacksiteProjectRoot}"],
      "env": {
        "RUST_BACKTRACE": "1",
        "WGPU_VALIDATION": "0",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Game: Debug",
      "cargo": {
        "args": ["build", "-p", "game", "--bin", "game", "--features", "dev"],
        "filter": { "name": "game", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": {
        "RUST_BACKTRACE": "1",
        "WGPU_VALIDATION": "0",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Game: GPU validation",
      "cargo": {
        "args": ["build", "-p", "game", "--bin", "game", "--features", "dev"],
        "filter": { "name": "game", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": {
        "RUST_BACKTRACE": "1",
        "WGPU_VALIDATION": "1",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Game: SDR fallback",
      "cargo": {
        "args": ["build", "-p", "game", "--bin", "game", "--features", "dev"],
        "filter": { "name": "game", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": {
        "RUST_BACKTRACE": "1",
        "BEVY_FPS_HDR": "0",
        "WGPU_VALIDATION": "0",
        "LD_LIBRARY_PATH": "${workspaceFolder}/target/debug/deps:${env:LD_LIBRARY_PATH}"
      },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Game: Release",
      "cargo": {
        "args": ["build", "--release", "-p", "game", "--bin", "game"],
        "filter": { "name": "game", "kind": "bin" },
        "env": { "CARGO_TARGET_DIR": "${workspaceFolder}/target" },
        "problemMatcher": "$rustc"
      },
      "args": [],
      "env": { "RUST_BACKTRACE": "1", "WGPU_VALIDATION": "0" },
      "cwd": "${workspaceFolder}",
      "terminal": "integrated",
      "sourceLanguages": ["rust"],
      "gracefulShutdown": "SIGINT"
    }
  ],
  "inputs": [
    {
      "id": "blacksiteProjectRoot",
      "type": "promptString",
      "description": "Absolute path to a Blacksite project root",
      "default": "${workspaceFolder}"
    }
  ]
}
