Skip to content

[Bug Report] VS Code debugging issues for Python extension 2024.18.0 or newer #2238

Closed

Description

@ozhanozen

When running Python scripts using VScode launch configs inside the base IsaacLab Docker container (without a Conda env), I get errors such as "the toml module not being found". I believe other issues on the same problem were raised before, e.g., #1976 and #1500, which are left unresolved. I have debugged the problem a bit and found the following:

Apparently, starting with version 2024.18.0 of the VSCode Python extension, the new interpreter resolver (the “native locator”) now ignores shell‐script wrappers specified in the python.defaultInterpreterPath setting (see this issue). This means IsaacLab Python environment is not setup correctly, resulting in the aforementioned errors.

Downgrading the VSCode Python extension version, using a conda environment, or adding the
"python.defaultInterpreterPath": "${workspaceFolder}/_isaac_sim/python.sh",
line to each of the launch.json entries seems to resolve the issue. Nevertheless, maybe there is a better way to do this.

Steps to reproduce

Within the base IsaacLab container, use VSCode Python extension version 2024.18.0 or newer, no conda environment (i.e., use _isaac_sim/python.sh), and try to use the debugger to play any of the launch.json entries. You should get errors due to the environment not being set. Actually, you can already see in the terminal that python.sh is not executed, but rather the underlying Python executable directly.

System Info

Describe the characteristic of your environment:

  • Commit: bc7c9f5
  • Isaac Sim Version: 4.5
  • OS: Ubuntu 22.04
  • GPU: 4090 RTX
  • CUDA: 12.2
  • GPU Driver: 535.129.03

Add any other context about the problem here.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Acceptance Criteria

  • VSCode Python debugger executing the correct bash/executable.
  • If not, documentation in "Known Issues".

Activity

  1. RandomOakForest commented on Apr 4, 2025

    @RandomOakForest
    Collaborator

    Thank you for catching this and posting your detailed findings. We appreciate that. The team will review this. Thanks.

  2. added
    bug
    on Apr 4, 2025
  3. emirkin commented on Jul 21, 2025

    @emirkin

    @RandomOakForest , any update on this issue?

  4. EricPedley commented on Jul 30, 2025

    @EricPedley

    It seems like VSCode has changed the syntax for launch.json so now the line you would need to add to your launch.json configurations is "python": "${workspaceFolder}/_isaac_sim/python.sh" (there is no "defaultInterpreterPath" property anymore).

  5. george-nehma commented on Jan 28, 2026

    @george-nehma

    I have created a new IsaacLabb project with ./isaaclab.sh --new and am trying to debug my script with this config for the launch.json file

    {
    "name": "Lander: Dreamer",
    "type": "debugpy",
    "request": "launch",
    "python": "/workspace/isaaclab/_isaac_sim/kit/python/bin/python3",
    "args" : ["--task", "Isaac-PlanetaryLander-Direct-6DOF-v0", "--num_envs", "8", "--enable_cameras"],
    "program": "${workspaceFolder}/scripts/dreamer/train.py",
    "cwd": "/workspace/SafeDreamer",
    "console": "integratedTerminal",
    "env": {
    "ISAAC_SIM_PATH": "/workspace/isaaclab/_isaac_sim",
    "CUDA_VISIBLE_DEVICES": "0"
    }
    },

    But the debugger immediately stops and doesn't attach.

    I can run the script from the project folder that was created like python scripts/dreamer/train.py --task=Isaac-PlanetaryLander-Direct-6DOF-v0 --num_envs=8 --enable_cameras and confirmed that works.

    What am I missing from my configuration? @RandomOakForest

  6. EricPedley commented on Jan 28, 2026

    @EricPedley

    I have created a new IsaacLabb project with ./isaaclab.sh --new and am trying to debug my script with this config for the launch.json file

    {
    "name": "Lander: Dreamer",
    "type": "debugpy",
    "request": "launch",
    "python": "/workspace/isaaclab/_isaac_sim/kit/python/bin/python3",
    "args" : ["--task", "Isaac-PlanetaryLander-Direct-6DOF-v0", "--num_envs", "8", "--enable_cameras"],
    "program": "${workspaceFolder}/scripts/dreamer/train.py",
    "cwd": "/workspace/SafeDreamer",
    "console": "integratedTerminal",
    "env": {
    "ISAAC_SIM_PATH": "/workspace/isaaclab/_isaac_sim",
    "CUDA_VISIBLE_DEVICES": "0"
    }
    },

    But the debugger immediately stops and doesn't attach.

    I can run the script from the project folder that was created like python scripts/dreamer/train.py --task=Isaac-PlanetaryLander-Direct-6DOF-v0 --num_envs=8 --enable_cameras and confirmed that works.

    What am I missing from my configuration? @RandomOakForest

    Try changing your python path to /workspace/isaaclab/_isaac_sim/python.sh. It runs some setup steps before running kit/python/bin/python3 on your script and those missing setup steps might be why you're having a problem.

  7. george-nehma commented on Jan 29, 2026

    @george-nehma

    @EricPedley Unfortunately this is how I first had it and it still gave the error.

    Image
  8. george-nehma commented on Feb 19, 2026

    @george-nehma

    @RandomOakForest Are there any updates for this issue, or how we might be able to run debugpy debugging sessions with the project format?

  9. StafaH commented on Sep 22, 2026

    @StafaH
    Collaborator

    Fixed in #7940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions