最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - VSCode - value of variables displaying automatically - Stack Overflow

programmeradmin2浏览0评论

I have suddenly started to get the variable values displayed as I step through VSCode, using the Python extension. I presume I must have pressed a key combo to turn it on, but any ideas how to turn it off please? I have looked through the key combo list, but cannot see anything obvious.

Thanks

I have suddenly started to get the variable values displayed as I step through VSCode, using the Python extension. I presume I must have pressed a key combo to turn it on, but any ideas how to turn it off please? I have looked through the key combo list, but cannot see anything obvious.

Thanks

Share Improve this question asked Feb 6 at 10:59 AlexisAlexis 351 silver badge4 bronze badges 11
  • What is "the Python extension"? Every extension has its own section in the GUI configuration view and in a JSON configuration file. Have you checked it? There are 3 places for configurations: workspace (.vscode directory`), user and system. Have you checked all 3 configuration files? AFAIK, there is no other place where this could be stored in VS Code. – jabaa Commented Feb 6 at 11:27
  • sorry my terminology is not great, by Python extension I mean the add on, the plug in, whatever it is called that lets displays python code fully. As I mentioned I checked the key bindings as clearly I just accidentally turned something on, and just need to turn it off again. I have cleared the keybindings.json file, although it was empty! – Alexis Commented Feb 6 at 11:32
  • "Extension" is the correct term, but the marketplace has dozens of Python extensions. Which one do you mean? If you change the configuration, it has to be stored in one of the listed files. Have you checked it? The workspace configuration is stored in the workspace root. The places for the user configuration and system configuration depend on your OS and maybe how you've installed VS Code. – jabaa Commented Feb 6 at 11:47
  • you are probably running in debug mode, so the values of the variables are displayed. That's quite useful, why do you want it away? All extensions have a json file with configuration, check there if there's a flag for turning this display off. – Cincinnatus Commented Feb 6 at 12:46
  • 1 This question is similar to: Visual Studio Code - How to display variable values inline during debugging?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. – starball Commented yesterday
 |  Show 6 more comments

1 Answer 1

Reset to default 0

Finally sorted it

"Debug: Inline Values" was set to Auto. Changed it to off and that cleared it.

I did try disabling showPythonInlineValues in the DebugPy and Notebook settings but that had no effect

发布评论

评论列表(0)

  1. 暂无评论