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

Debugger does not work in a venv installation of Python #1288

Closed
ReagentX opened this issue Apr 3, 2018 · 4 comments
Closed

Debugger does not work in a venv installation of Python #1288

ReagentX opened this issue Apr 3, 2018 · 4 comments
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@ReagentX
Copy link

ReagentX commented Apr 3, 2018

Environment data

  • VS Code version: 1.21.1
  • Extension version (available under the Extensions sidebar): 2018.3.1
  • OS and version: MacOS 10.13.4
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: None

Actual behavior

All breakpoints are ignored when debugging Python from inside a venv.

Expected behavior

Breakpoints are not ignored.

Steps to reproduce:

Using:

import sys
print(sys.version)
print(sys.executable)

Put a breakpoint on line 2

Logs

Output for Python in the Output pane


Output from Console under the Developer Tools panel

3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
/Users/chris/Code/Python/np/bin/python

Configuration Files

launch.json

{
    "name": "Python: Current File",
    "type": "python",
    "request": "launch",
    "pythonPath": "/Users/chris/Code/np/bin/python",
    "program": "${file}"
}

settings.json

{
    "python.pythonPath":"/Users/chris/Code/np/bin/python",
    "python.autoComplete.addBrackets": true
}

Notes

When I run the same code using the system installation the debugger works fine.

The issue also only persists when the type is set to python and not when it is set to pythonExperimental.

@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs verification area-debugging info-needed Issue requires more information from poster and removed needs verification labels Apr 3, 2018
@brettcannon
Copy link
Member

Obviously this is weird since others can debug on macOS. Are you using the macOS build of CPython from python.org? (I'm just guessing at what might be different about your setup.)

@ReagentX
Copy link
Author

I have Python 3.6.5 installed from Python.org and I created the venv using python3 -m venv /path/to/new/virtual/environment, which to my knowledge is not out of the ordinary.

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Apr 12, 2018
@ReagentX
Copy link
Author

ReagentX commented Apr 18, 2018

It seems to only affect this one venv and not any others I create work fine. Since I have no way of reproducing this issue I think it is reasonable to close this issue.

@brettcannon
Copy link
Member

Sorry we never figured out the cause.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants