local dap = require("dap")

dap.configurations.cpp = {
  {
    name = "Run Debug",
    type = "codelldb",
    request = "launch",
    program = "${workspaceFolder}/build/lifeograph",
    cwd = "${workspaceFolder}/build",
    stopOnEntry = false,
    args = {},
    env = { LIFEOGRAPH_CONFIG_FILE = "${workspaceFolder}/../../materials/lifeo.conf.dev" },
    -- env = { { name = "LIFEOGRAPH_CONFIG_FILE", value = "${workspaceFolder}/../../materials/lifeo.conf.dev" },
    -- { name = "G_ENABLE_DIAGNOSTIC", value = "1" }, },
  },
  {
    name = "Run Debug G_DEBUG",
    type = "codelldb",
    request = "launch",
    program = "${workspaceFolder}/build/lifeograph",
    cwd = "${workspaceFolder}/build",
    stopOnEntry = false,
    args = {},
    env = {
      LIFEOGRAPH_CONFIG_FILE = "${workspaceFolder}/../../materials/lifeo.conf.dev",
      G_DEBUG = "fatal-criticals",
    },
    -- env = { { name = "LIFEOGRAPH_CONFIG_FILE", value = "${workspaceFolder}/../../materials/lifeo.conf.dev" },
    -- { name = "G_ENABLE_DIAGNOSTIC", value = "1" }, },
  },
  {
    name = "Run Debug --force-welcome",
    type = "codelldb",
    request = "launch",
    program = "${workspaceFolder}/build/lifeograph",
    cwd = "${workspaceFolder}/build",
    stopOnEntry = false,
    args = { "--force-welcome" },
    env = { LIFEOGRAPH_CONFIG_FILE = "${workspaceFolder}/../../materials/lifeo.conf.dev" },
  },
  {
    name = "Run Debug Open Encrypted File",
    type = "codelldb",
    request = "launch",
    program = "${workspaceFolder}/build/lifeograph",
    cwd = "${workspaceFolder}/build",
    stopOnEntry = false,
    args = { "/home/ahmet/Projects/Software/lifeograph/diaries/test2enc-123456.rznm" },
    env = { LIFEOGRAPH_CONFIG_FILE = "${workspaceFolder}/../../materials/lifeo.conf.dev" },
  },
        -- {
        --   name = 'Run Debug Opimized' TODO...
        -- },
}
