Is there a Variable Explorer for PyCharm

2019-01-13 15:04发布

I recently changed from Spyder to PyCharm as a Python IDE. In Spyder I have often used the variable explorer feature (see picture). Is this feature also available in PyCharm?enter image description here

I found this here, that "Variable explorer in Python console (traff)" should be included in PyCharm 3, but I cannot find that. Maybe someone could tell me how to use that tool.

标签: pycharm
7条回答
Animai°情兽
2楼-- · 2019-01-13 15:10

PyCharm has SciView for exploring variables in almost exactly the same manner as Spyder. Simply execute the selection or cell in console, then click View as Array in the Special Variable pane. Special Variable Pane

查看更多
再贱就再见
3楼-- · 2019-01-13 15:15

Step 1. Make a breakpoint by pressing on the right of the line numbers. Step 2. Click the debug button or right click then debug Step 3. Press the button above the settings button in the console to view the variables Step 4. Double click the variable of what you want to check the values. You can also right click that particular variable and view it as a dataframe.

查看更多
迷人小祖宗
4楼-- · 2019-01-13 15:15

The simple trick:

put any dummy line at the end of your code, e.g.

print('hi')

and set break point at this line.

Then, run your code in debug mode. Enjoy! The screenshots of editor and debug window are shown for your reference.

Editor window

Variables in debug window

查看更多
【Aperson】
5楼-- · 2019-01-13 15:17

Right-click on the file and click Run file in console. Everytime you run it, the variables will show in the console until you click the stop button.

查看更多
Lonely孤独者°
6楼-- · 2019-01-13 15:28

I like Spyder for interacting with my variables and PyCharm for editing my scripts. Alternative Solution: use both simultaneously. As I edit in PyCharm (on Mac OS), the script updates live in spyder. Best of both worlds!

查看更多
Melony?
7楼-- · 2019-01-13 15:30

The variable list is available in the python console Tools --> Run Python Console... as shown in the screen shot below. Similar functionality for showing variables and watched variables is available in the debugger console.

enter image description here

查看更多
登录 后发表回答