Skip to content

a bug when debug a python program in venv #13179

Closed
@likapan

Description

@likapan

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

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions