VSCode — how to set working directory for debug

前端 未结 7 1452
耶瑟儿~
耶瑟儿~ 2020-11-27 03:10

I\'m starting to use vscode for Python. I have a simple test program. I want to run it under debug and I need to set the working directory for the run.

How/where d

7条回答
  •  广开言路
    2020-11-27 03:36

    To set current working directory to whatever file you are executing at the time:

    File > Preferences > Settings > Python > Data Science > Execute in File Dir

    Thanks brch: Python in VSCode: Set working directory to python file's path everytime

提交回复
热议问题