Skip to content

a bug when debug a python program in venv #13179

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

Closed
likapan opened this issue Jul 29, 2020 · 2 comments
Closed

a bug when debug a python program in venv #13179

likapan opened this issue Jul 29, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@likapan
Copy link

likapan commented Jul 29, 2020

Environment data

  • VS Code version: 1.47.2
  • Extension version (available under the Extensions sidebar): 2020.7.96456
  • OS and version: Archlinux
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: None
  • Relevant/affected Python-related VS Code extensions and their versions: None
  • Value of the python.languageServer setting:

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
I'm a programming begginer,and when I try to debug a program like this:

a=input()
print(a)

in venv
and launch.json is default

Expected behaviour

Input: a
Output:a

Actual behaviour

Auto input: source xxx/bin/activate
Output: source xxx/bin/activate

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. linux version have this issue,windows not
  2. Steps are as above

debug a program like this:

a=input()
print(a)

in venv
and launch.json is default

Logs

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

XXX

@likapan likapan added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Jul 29, 2020
@karthiknadig karthiknadig self-assigned this Jul 29, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jul 29, 2020
@karthiknadig
Copy link
Member

karthiknadig commented Jul 29, 2020

@likapan This is a known issue #5559 (which is covered by a broader set of terminal issues #4568) . Here is workaround that you can try:

  1. Disable auto activation in terminals: "python.terminal.activateEnvironment": false, and Exit VSCode.
  2. In a terminal outside of VSCode, navigate to your project and activate terminal there.
  3. Start vscode using code . from an activated environment.

@karthiknadig karthiknadig added the info-needed Issue requires more information from poster label Jul 31, 2020
@ghost ghost removed the triage label Aug 25, 2020
@karthiknadig
Copy link
Member

Closed this, since there were no updates on this bug.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants