Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to step into dependency code using Visual Studio Code?

When debugging my user code, I want to step into the code of a dependency that is installed e.g. with pip install -e path/to/package.

I tried to find a place within the project where dependencies are listed and can be browsed to open the source file to debug (e.g. this is possible in PyCharm via the "External Libraries" section).

I would like to step into and through dependency code, but cannot find a way to do so.

like image 752
phaebz Avatar asked Mar 23 '26 19:03

phaebz


1 Answers

Disable justMyCode in the launch.json file. This is enabled by default.

{
    // 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: Module",
            "type": "python",
            "request": "launch",
            "module": "my_package",
            "justMyCode": false
        }
    ]
}

This helped me resolve issue on Studio Version: 1.63.2 (Universal)

like image 118
Rahul Goyal Avatar answered Mar 26 '26 10:03

Rahul Goyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!