question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't step into code defined in a lib

See original GitHub issue

From @thiagorabelo on September 13, 2017 21:28

Environment data

VS Code version: 1.15.1 Python Extension version: 0.7.0 Python Version: 3.5.2 (in a virtual environment) OS and version: Kubuntu 16.04.3 LTS

Actual behavior

Can’t step into line when this line is in a lib (at least in Django).

visual_code_python

In this example instead of debugger enter in code definition of “get_object_or_404” in file “django/shortcut.py”, in folder “site-package” of virtual environment, it jumps to “_pq_fetch_tuples” method on line 796 in Cursor class in file “psycopg2cffi/_impl/cursor.py” in “site-package” folder of virtual environment.

In same way, instead step into “render” function in “django/shotcuts.py”, jumps to function “urlparse” in “/usr/lib/python3.5/urllib/parse.py” at line 301.

Expected behavior

Enter the appropriate function.

visual_code_python_2

Steps to reproduce:

  • While debugging some block of code, step into a function or method defined in some lib.

Logs

Output from Python output panel
Empty

Output from Console window (Help->Developer Tools menu) Empty

Copied from original issue: DonJayamanne/pythonVSCode#1210

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, May 3, 2018

Lol, I’m no longer able to replicate this issue. @thiagorabelo Please could you try debugging using the experimental debugger. All you need to do is:

  • Open launch.json
  • Change "type":"python" to "type":"pythonExperimental"
  • Add the setting "django": true

Here you go:

        {
            "name": "Django",
            "type": "pythonExperimental",
            "request": "launch",
            "stopOnEntry": false,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceRoot}/manage.py",
            "args": [
                "runserver",
                "--noreload"
            ],
            "django": true
        },
1reaction
DonJayamannecommented, Jan 22, 2018

@thiagorabelo I’ve been able to replicate this issue. Thanks, we have what we need at this stage, we’ll keep you posted on the progress of this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to step into a function in a shared library with GDB
GDB is not stepping into either of the shared libraries. bt gives the name of the function where the problem occurred, but list...
Read more >
Can't step into shared library function - Google Groups
Anyone know what's going on? The program works when run either standalone on within GDB. Just can't step into the shared library. Any...
Read more >
Cannot debug (step into) my own custom library
Hi, When you build a library, the path and filename of the source files are encoded into the library so that debuggers can...
Read more >
Cannot step into other open projects to debug
Hi,. This problem has been occurring for at least one week. I have two open solutions in a single instance of VS for...
Read more >
Not Just My Code: How to debug third party libraries without ...
Step 1 — Generate symbols using decompiling tool dotPeek. When library is built in Visual Studio it's it's also supplied with *.PDB files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found