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.

2018.6.0 cannot step into standard library even with experimental python

See original GitHub issue

Environment data

  • VS Code version: Version 1.24.1 (1.24.1) 24f62626b222e9a8313213fb64b10d741a326288
  • Extension version (available under the Extensions sidebar): 2018.6.0
  • OS and version: OS X 10.13.5 (17F77)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
  • Relevant/affected Python packages and their versions: stdlib argparse

Actual behavior

step-into does not step into library code and merely continues

Expected behavior

step-into steps into library code

Steps to reproduce:

  1. pyenv install 3.6.5
  2. pyenv virtualenv -p python3.6 3.6.5 scratch-3.6
  3. open vscode, new workspace, new empty folder
  4. new file -> test.py
  5. test.py:
import argparse

parser = argparse.ArgumentParser()

parser.add_argument( 'foo' )
  1. add debug configuration (python OR python experimental)
  2. add breakpoint at line 5: parser.add_argument( 'foo' )
  3. F5
  4. step-into

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

N\A (nothing!)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1311  INFO no standard startup: not just one window
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3454 Overwriting grammar scope name to file mapping for scope source.ruby.
Old grammar file: /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ruby/syntaxes/ruby.tmLanguage.json.
New grammar file: /Users/eedwards/.vscode/extensions/rebornix.ruby-0.18.0/syntaxes/ruby.cson.json

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
DonJayamannecommented, Jul 13, 2018

I can confirm this works in the experimental debugger Please add the setting "debugStdLib": true in your launch.json. Here’s the config settings from my launch.json:

        {
            "name": "Python Experimental: Current File (Integrated Terminal)",
            "type": "pythonExperimental",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "debugStdLib": true
        },

Please test with the above settings and let me know how it goes?

0reactions
brettcannoncommented, Oct 18, 2018

This has not been supported yet. See #2087 for the issue tracking the fix for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I step into Python library code? - Stack Overflow
pdb , the Python Debugger, cannot step into C functions like os.mkdir , but gdb can. Try this: gdb --args python whatever.py ......
Read more >
Package List — Spack 0.20.0.dev0 documentation
Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily ......
Read more >
Easy way to not step into Python standard library
I'm new to Python, and I'm looking for a way to not have the debugger step into standard Python libraries. Is there an...
Read more >
How to Make the Most of Your Python Debugger in VSCode
abspath() which is a standard library function. That means you must step into this function and to do, we can use the Step...
Read more >
Using - “libc++” C++ Standard Library - LLVM
Using a different version of the C++ Standard; Enabling experimental C++ Library features; Using libc++ when it is not the system default; Using...
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