forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster
Description
Behaviour
I expect set python.terminal.executeInFileDir=true will let run python file command run under the file dir, but the terminal is first execute the python file, then change to file dir.
the button is not working on the first run.
PS, report bug is also not working.
report bug jump to a instruction page, instruct to create bug from vscode.
but from vscode, click preview button jump to issue template select dialog.
loop forever.
Steps to reproduce:
- close all running terminal
- create a folder, and add a py file
- print(os.getcwd())
- click run python file button
- the terminal print the workspace dir, and after execute the py file, the terminal change to the file location.
Diagnostic data
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
import os
print("current dir", os.getcwd())
source /workspace/runner/venv/bin/activate
root ➜ /workspace/runner (master) $ source /workspace/runner/venv/bin/activate
(venv) root ➜ /workspace/runner (master) $ /workspace/runner/venv/bin/python -B /workspace/runner/demo/r.py
cd /workspace/runner/demo
current dir /media/workspace/runner
(venv) root ➜ /workspace/runner (master) $ cd /workspace/runner/demo
(venv) root ➜ /workspace/runner/demo (master) $
Metadata
Metadata
Assignees
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster