microsoft / microsoft/vscode-python-environments
Support `uv run` as an optional default run action.
@anthonykim1 已经在做这个了。
开始于 2026年3月13日。
- 主要语言
- TypeScript
- 星标
- 138
- 派生
- 62
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 35
描述
Currently, the Run Python File in Terminal play button (and the default python debugger) is hardcoded to run the current python file using the activated environment.
For uv scripts with dependencies this causes an issue.
If it were possible to configure this as a setting to run using uv run ${file} instead, it would allow seamless integration for rust scripts, same for the debugger.
I've come from related issues: https://github.com/astral-sh/uv/issues/8558, https://github.com/astral-sh/uv/issues/7803, and https://github.com/astral-sh/ty-vscode/issues/353, but realised it's not possible to implement this feature anywhere other than the vscode-python repo.
Debugging can work with a custom launch.json specifying uv run --with-requirments ${file} python, but this has the caveat that it will fail for scripts with no inline dependencies defined. Being able to use just uv run as the actual command would allow it to always work. Though my guess is this requires work on debugpy itself to better support uv.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。