Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2018.6.0 cannot step into standard library even with experimental python #2039

Closed
eedwards-sk opened this issue Jun 21, 2018 · 7 comments

Comments

@eedwards-sk
Copy link

commented Jun 21, 2018

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

@brettcannon brettcannon changed the title 2018.6.0 cannot step into library code even with experimental python 2018.6.0 cannot step into standard library even with experimental python Jun 21, 2018

@Bullenj01

This comment has been minimized.

Copy link

commented Jul 13, 2018

I have the same results using venv and VS Code version 1.25.1 using the Experimental Python debugger. If I create a new default launch.json with the standard debugger file it ignores my break points completely and just runs through the program.

@DonJayamanne DonJayamanne self-assigned this Jul 13, 2018

@DonJayamanne DonJayamanne added this to the Aug 2018 milestone Jul 13, 2018

@DonJayamanne

This comment has been minimized.

Copy link

commented 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?

@Bullenj01

This comment has been minimized.

Copy link

commented Jul 13, 2018

Yes, that did work. Though I think there is still something that has changed in my environment because I have a co-worker running on the same version of VS Code, debugging the same program and he does not have that in his launch.json file. With his, whenever he gets to a "Import" statement it opens up that code being import and you can continue stepping into it. With mine, it now works inside the module(thanks to adding the debugStdLib) but as soon as it hits an import I get an error regarding "Unable to open '':File not found. So I'm looking into that now. I've already done a uninstall/reinstall to try and clear out whatever is breaking it to now avail.

@Bullenj01

This comment has been minimized.

Copy link

commented Jul 13, 2018

I think my current issue is something outside of VS Code as I have the same issue with pdb. so setting that variable in launch.json does resolve this issue.

@DonJayamanne DonJayamanne removed this from the Aug 2018 milestone Jul 21, 2018

@DonJayamanne

This comment has been minimized.

Copy link

commented Sep 27, 2018

@Bullenj01 @eedwards-sk
It should be fixed, please test the latest development version of the extension. Instructions can be found here https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build

@Almenon

This comment has been minimized.

Copy link

commented Oct 18, 2018

Has the fix been released in the latest published version (2018.9.0) yet? I'm guessing not because I'm running into the same error.

@brettcannon

This comment has been minimized.

Copy link
Member

commented Oct 18, 2018

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

@lock lock bot locked as resolved and limited conversation to collaborators Nov 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.