You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修改VSCode中Python调试Watch窗口的变量显示上限

修改VSCode Python调试Watch窗口变量显示数量
  • 打开你的launch.json文件,找到Python: Current File这个调试配置项
  • 在该配置里新增"maxVariables": -1属性,设置为-1表示不限制变量显示数量,你也可以指定具体数值(比如1000)
  • 修改后的Python配置代码如下:
{
    "name": "Python: Current File",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "console": "integratedTerminal",
    "maxVariables": -1
}

保存配置后重启调试,Watch窗口就会显示全部变量,不再受默认300个的限制。

内容的提问来源于stack exchange,提问作者Kinnikuman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 07:11:05