Skip to content

python.terminal.executeInFileDir not working, cd does not change to .py file's diectory #1077

@ThomasMConnors

Description

@ThomasMConnors

A diffent twist from #835. Vscode using the python extensions I have a large folder with many subfolders. If i execute a python file in a subfolder it can not find a data file in that same subfolder.

Setting "python.terminal.executeInFileDir": true will cd but to the top of the folder opened in VSCode and not ther subdir the file exists in.

Adding "cwd": "${fileDirname}" will work, but executeInFileDir is not working as expected. (Also tested in VSCode's settings dialog.)

A further test shows that executeInFileDir works if started from a saved vscode workspace. yet the docs do not say a workspace is required.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions