microsoft/ptvsd

Unable to step into inside conda env, python debugger

greatsharma opened this issue · 2 comments

I am using python debugger inside conda env. I set the pythonPath to the conda env bin location. When I using python debugger step into is not working, it is not opening the file to which I want to step into.
Here I placed a breakpoint at line 46 and when I click step into it should ideally go into __call__ method inside /home/winter_soilder/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/nn/modules/module.py but it directly goes to line 22 of the forward function.
vscode

settings.json ->

{
    "python.pythonPath": "/home/winter_soilder/anaconda3/envs/pytorch/bin/python",
    "python.autoComplete.extraPaths": [
        "/home/winter_soilder/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch",
        "/home/winter_soilder/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchvision"
    ]
}

lauch.json ->

{
    // 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": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        }
    ]
}

@greatsharma To debug inside site-packages add "justMyCode": false to your debug configuration in launch.json.

@karthiknadig thanks a lot it's now working like a charm :)