Repository navigation
set python.terminal.executeInFileDir not working, python file run earlier than cd command #835
Description
Activity
- addedfeature-requestRequest for new features or functionalityRequest for new features or functionality
on Apr 30, 2025 karthiknadig commented
on Apr 30, 2025 MemberMore actionskaala (@kaala) Can you share the logs from Output > Python?
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Apr 30, 2025 - addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugand removedfeature-requestRequest for new features or functionalityRequest for new features or functionality
on May 1, 2025 Can you set your log level to trace, and reproduce the behavior to get a more verbose log?
Also which OS are you using, and which shell?Does it help if you turn off
terminal.integrated.shellIntegration.enabledsetting?I use remotessh to linux server, ubuntu. and the shell is bash.
I changed python log level to trace, and the output is the same, nothing new.
I wasn't set terminal.integrated.shellIntegration.enabled, but set it to false seems fixed the problem.Reacted by Anthony Kim and Yiming XuHey Anthony Kim (@anthonykim1), this issue might need further attention.
kaala (@kaala), you can help us out by closing this issue if the problem no longer exists, or adding more information.
same here. please fix!
Issue persists
Ext v2025.10.0
VS Insider v1.103.0-insiderIt no longer changing dir. Running in root directory.
Working in Run Python file in dedicated terminal (however inconsistent, keeps spawning too many terminals)Hey Anthony Kim (@anthonykim1), this issue might need further attention.
kaala (@kaala), you can help us out by closing this issue if the problem no longer exists, or adding more information.
3 remaining items
- assigned and unassigned
on Sep 13, 2025 - addedconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.
on Dec 10, 2025 - assigned and unassigned
on Dec 15, 2025 - addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugarea-terminalEnvironment extension specific terminal issues.Environment extension specific terminal issues.and removed
on Dec 15, 2025 anthonykim1 commented
on Dec 15, 2025 ContributorMore actionsAre folks still experiencing this?
Hi, the problem seems fixed in vscode 1.107.0.
Reacted by Anthony Kim and Ratul Hasan- locked as resolved and limited conversation to collaborators
on Apr 28, 2026

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:
Diagnostic data
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)