{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        // For standalone script execution
        {
            "name": "Python: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
        },
{% for specification in specifications %}
  {% for rl_library in specification.rl_libraries %}
    {% for rl_algorithm in rl_library.algorithms %}
        {
            "name": "Python: Train {{ specification.task.id }} with {{ rl_library.name }} ({{ rl_algorithm|upper }})",
            "type": "debugpy",
            "request": "launch",
      {% if rl_library.name == "skrl" %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "4096", "--headless", "--algorithm", "{{ rl_algorithm|upper }}"],
      {% else %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "4096", "--headless"],
      {% endif %}
            "program": "${workspaceFolder}/scripts/{{ rl_library.name }}/train.py",
            "console": "integratedTerminal",
        },
        {
            "name": "Python: Play {{ specification.task.id }} with {{ rl_library.name }} ({{ rl_algorithm|upper }})",
            "type": "debugpy",
            "request": "launch",
      {% if rl_library.name == "skrl" %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "32", "--algorithm", "{{ rl_algorithm|upper }}"],
      {% else %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "32"],
      {% endif %}
            "program": "${workspaceFolder}/scripts/{{ rl_library.name }}/play.py",
            "console": "integratedTerminal",
        },
    {% endfor %}
  {% endfor %}
{% endfor %}
        // For script execution inside a Docker
        {
            "name": "Docker: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "env": {
                "PYTHONPATH": "${env:PYTHONPATH}:${workspaceFolder}"
            }
        },
{% for specification in specifications %}
  {% for rl_library in specification.rl_libraries %}
    {% for rl_algorithm in rl_library.algorithms %}
        {
            "name": "Docker: Train {{ specification.task.id }} with {{ rl_library.name }} ({{ rl_algorithm|upper }})",
            "type": "debugpy",
            "request": "launch",
      {% if rl_library.name == "skrl" %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "4096", "--headless", "--algorithm", "{{ rl_algorithm|upper }}"],
      {% else %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "4096", "--headless"],
      {% endif %}
            "program": "${workspaceFolder}/scripts/{{ rl_library.name }}/train.py",
            "console": "integratedTerminal",
            "env": {
                "PYTHONPATH": "${env:PYTHONPATH}:${workspaceFolder}"
            },
        },
        {
            "name": "Docker: Play {{ specification.task.id }} with {{ rl_library.name }} ({{ rl_algorithm|upper }})",
            "type": "debugpy",
            "request": "launch",
      {% if rl_library.name == "skrl" %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "32", "--algorithm", "{{ rl_algorithm|upper }}"],
      {% else %}
            "args" : ["--task", "{{ specification.task.id }}", "--num_envs", "32"],
      {% endif %}
            "program": "${workspaceFolder}/scripts/{{ rl_library.name }}/play.py",
            "console": "integratedTerminal",
            "env": {
                "PYTHONPATH": "${env:PYTHONPATH}:${workspaceFolder}"
            },
        },
    {% endfor %}
  {% endfor %}
{% endfor %}
    ]
}
