question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot plot local varibles in variable explorer when debugging

See original GitHub issue

my python file:

import numpy as np
def func():
    bb = np.arange(10)
    return bb      # breakpoint here

a = np.arange(5)
cc = func()
  1. put a breakpoint before return bb and debug the file
  2. 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])
  3. right click on a and select plot, no problem. BUT, right click on bb and select bb, report ***KeyError: 'bb'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Mar 20, 2020

Plotting of variables while debugging only works with the inline backend, not with other Matplotlib backends.

0reactions
ccordoba12commented, Jul 29, 2022

@bburne, please open a new issue about that and post a simple code example that reproduces it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found