Spyder: Variable Explorer and Editor are not updated when breakpoints are placed in submodules

Created on 20 Jan 2017  路  8Comments  路  Source: spyder-ide/spyder

Description of your problem

What steps will reproduce the problem?

  1. Through the editor, set a break point in a sub-module, says MySubModule.py.
  2. Launch a run in debugging mode from MyMainModule.py (where MyMainModule.py will in turn launch MySubModule.py and reach the break point there).

What is the expected output? What do you see instead?
Expected output:
1) When the break point is reached, the editor should jump to MySubModule.py and highlight the line where the break point is.
2) I should see my variables (dataframes, etc.) in the variable explorer as they are at the break point.

What I see instead:
1) Upon reaching the break point, the execution correctly stops (and the execution console correctly shows the break point), but the editor does not move to MySubModule.py where the break point is. It stays on MyMainModule.py.
2) Most critically: the variable explorer is empty. Totally.

Please provide any additional information below

Everything worked fine up until version 2.3.9. Starting with version 3.0.0, I have got these bugs.

Versions and main components

  • Spyder Version: 3.1.0
  • Python Version: 3.5.1
  • Operating system: Windows 10 64 bits

Dependencies

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.1 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.2 (OK)
pandas >=0.13.1 : 0.19.2+0.g825876c.dirty (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.6.0 : 1.1.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.3.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

Debugger Bug

Most helpful comment

Bug spyder 3.1.0.zip

Hi @dalthviz, sure. To reproduce the bug(s), please:

  • Unzip the attached file ("Bug spyder 3.1.0.zip") in a folder, open MyMainModule.py and MySubModule.py in Spyder
  • Set a break point in MySubModule.py at line 12 ("c=3")
  • Run MyMainModule.py in debug mode
  • Move to the next break point

What you see in Spyder 3.1.0: 1) The variable explorer is empty; 2) the editor stays on MyMainModule.py.

What you should see (and actually see in Spyder 2.3.9): 1) The variable explorer shows variables a and b;
2) the editor moves to MySubModule.py and highlights line 12.

I hope this helps.
Many thanks to you guys for your great work.

All 8 comments

@dalthviz, please take a look at this one.

Hi I have this same exact issue. Was hoping 3.1 would fix it. I'm on Windows 10.

Thanks for developing this guys, hope you can get this one fixed. I used to use the debugger a lot. Still can but have to type in every variable name etc.

Hi @CharlesVellutini and @Davo36 , sorry for the late response, can you guys provide an example of the code to run in the debug mode that is showing this behavior (the MyMainModule.py and MySubModule.py)?

Bug spyder 3.1.0.zip

Hi @dalthviz, sure. To reproduce the bug(s), please:

  • Unzip the attached file ("Bug spyder 3.1.0.zip") in a folder, open MyMainModule.py and MySubModule.py in Spyder
  • Set a break point in MySubModule.py at line 12 ("c=3")
  • Run MyMainModule.py in debug mode
  • Move to the next break point

What you see in Spyder 3.1.0: 1) The variable explorer is empty; 2) the editor stays on MyMainModule.py.

What you should see (and actually see in Spyder 2.3.9): 1) The variable explorer shows variables a and b;
2) the editor moves to MySubModule.py and highlights line 12.

I hope this helps.
Many thanks to you guys for your great work.

VariableExplorerProblem.zip

Hi @dalthviz, first time posting code here, I hope you can see this.

My code is similar to Charles' but in one module. Put a stop in the function and the varibale explorer shows nothing and the line in the source is not highlighted.

Any piece of code shows this error as far as I can see.

Interestingly, I am using 3.1 and I see the varibale explorer working correctly for variables created in the iPython console. Their name, type and value are shown correctly.

I'm encountering the same issue as well. This was working in Spyder 2 and ever since I've moved to Spyder 3 this problem has started happening
I'm using spyder on linux

@CharlesVellutini, thanks a lot for your test case. I ran it manually against PR #4202 and verified that that PR fixes your issue.

The fix will be part of Spyder 3.2

Thanks @ccordoba12, great news.

Was this page helpful?
0 / 5 - 0 ratings