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

VS Code是否具备Spyder中类似Variable Explorer的功能?

Does VS Code have a Variable Explorer like Spyder?

Hey there! I totally get why you’re asking—Spyder’s Variable Explorer is such a handy tool for keeping track of your variables, especially when working with data frames or complex objects. Let’s break down how you get similar functionality in VS Code:

Built-in Debug Variables Panel

First off, VS Code has a built-in variable viewer that activates when you’re in a debugging session:

  • Hit F5 to start debugging your Python script (make sure you set a breakpoint somewhere so execution pauses)
  • Switch to the Run and Debug panel on the left (the icon looks like a play button with a bug)
  • Look for the Variables section here—it’ll show all variables in the current scope, let you expand objects to see their attributes, and even let you edit values on the fly.

Jupyter Variable Viewer (Most Similar to Spyder’s)

If you work with Jupyter notebooks or VS Code’s interactive Python window, this is the closest match to Spyder’s Variable Explorer:

  1. Make sure you have the official Jupyter extension installed (it’s usually included with the Python extension pack)
  2. Run your code cells or start an interactive session
  3. Look for the Variables button in the top-right corner of the editor (it looks like a table icon)
  4. Clicking it opens a panel that lets you view variables in a table format—perfect for pandas DataFrames, where you can sort columns, filter values, and even edit data just like in Spyder.

Third-Party Extensions for Extra Functionality

If you need more flexibility (like viewing variables without being in debug mode), check out these extensions:

  • Variable Inspector: Lets you inspect variables from your interactive session or script runs, with support for viewing data structures in readable formats.
  • Debug Visualizer: Great for visualizing arrays, matrices, and other complex data types alongside their raw values.

I know it can be frustrating when you can’t find exactly what you’re looking for via Google—sometimes the key is searching for terms like "VS Code Jupyter variable viewer" instead of just "variable explorer" to hit the right resources.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.30 13:09:11