Cannot plot local varibles in variable explorer when debugging
See original GitHub issuemy python file:
import numpy as np
def func():
bb = np.arange(10)
return bb # breakpoint here
a = np.arange(5)
cc = func()
- put a breakpoint before
return bb
and debug the file - the program stops before return, and now two variables in the variable explorer: * global variable a = array([0, 1, 2, 3, 4]) * local variable bb = array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
- right click on a and select plot, no problem. BUT, right click on bb and select bb, report
***KeyError: 'bb'
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Viewing Local Variables in Spyder's Variable Explorer
Go to the options menu of the Variable Explorer (the last icon from left to right on it). Select the option called Exclude...
Read more >Variable Explorer — Spyder 5 documentation
Spyder Variable Explorer execution with a variable of type list. It shows the namespace contents (including all global objects, variables, class instances ...
Read more >View variable values in data tips - Visual Studio (Windows)
Use data tips to conveniently view information about variables, including arrays and structures, while debugging.
Read more >Stepping through code and inspecting variables to isolate ...
Select the scope of variables to view from the selector at the bottom left of the viewer: automatic, local, or all variables, registers,...
Read more >Debugging an application - - Users Guide
You cannot change the value of a variable in a remote component. ... For example, you might want to combine local and global...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Plotting of variables while debugging only works with the inline backend, not with other Matplotlib backends.
@bburne, please open a new issue about that and post a simple code example that reproduces it.