3

I am using PyCharm 5.0.3 and I was wondering if there is a way to have a window for the variable workspace similar to R or MatLab. I have seen that Spyder has similar panes to MatLab. This is what I am kind of looking for:

Workspace

I find the workspace window in MatLab very helpful for recognizing possible issues with the code. Is this possible, or will I need to switch to another IDE? I have seen that it is possible to see the variables while using the debugger function in PyCharm but when I run a simple couple of lines (shown below) through the debugger and look at the varibles I get this

import numpy as np
Dim = 11
V = np.zeros(shape=(11,11))

Workspace in PyCharm?

Adam Warner
  • 1,334
  • 2
  • 14
  • 30
  • 2
    You need to set a break point. – Peter Wood Jan 05 '16 at 16:30
  • Unlike MATLAB, there is no base workspace so there is no [scripts vs. functions](http://www.mathworks.com/help/matlab/matlab_prog/scripts-and-functions.html) distinction. If you want to view variables in the debugger you have to actually [stop your code to enter the debugger](https://www.jetbrains.com/pycharm/help/starting-the-debugger-session.html), as @PeterWood has already said. If you are looking for variables created when using the Python Console, the linked duplicate shows how to do this. – sco1 Jan 05 '16 at 16:34

1 Answers1

3

Yes you can have this

Run you application code in Debug mode - look at the bottom frame "Debug".

Now you have 2 further panels Variables and Watches

Drag a "variable" into the Watches panel - and you can see it's value as the program is executed.

This works with Free and Pro versions of Py-Charm

Tim Seed
  • 5,119
  • 2
  • 30
  • 26