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.

Console blocks when debugging if using the Tkinter graphics backend on Windows

See original GitHub issue

Issue Report Checklist

  • [x ] Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [ x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • [ x] Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • [x ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

when using ctrl-F5 to debug a file , the console blocks

debugfile(‘D:/code/hyperion_metadata/python_code/untitled4.py’, wdir=‘D:/code/hyperion_metadata/python_code’)

d:\code\hyperion_metadata\python_code\untitled4.py(2)<module>() 1 # -- coding: utf-8 -- ----> 2 “”" 3 Created on Tue Mar 22 16:52:09 2022 4 5 @author: RMT7801

IPdb [1]: !continue

I did not find a way to get the console active again.

What steps reproduce the problem?

  1. create a simple python file
  2. place a break point
  3. press ctrl+F5

What is the expected output? What do you see instead?

in previous versions, the console goes trough the file in debug mode and halts on the first breakpoint.

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version: 5.2.2 None
  • Python version: 3.7.9 64-bit
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree                  :  None (OK)
IPython >=7.6.0;<8.0.0        :  7.31.1 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.4.0 (OK)
keyring >=17.0.0              :  23.5.0 (OK)
nbconvert >=4.0               :  6.4.0 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.9.2 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0                :  2.12.2 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.3.2;<1.4.0          :  1.3.3 (OK)
pylsp_black >=1.0.0           :  1.0.1 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.1 (OK)
qtconsole >=5.2.1;<5.3.0      :  5.2.2 (OK)
qtpy >=1.5.0                  :  2.0.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  60.5.0 (OK)
sphinx >=0.6.6                :  4.3.2 (OK)
spyder_kernels >=2.2.1;<2.3.0 :  2.2.1 (OK)
textdistance >=4.2.0          :  4.2.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog                      :  2.1.6 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  0.29.26 (OK)
matplotlib >=2.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.19.3 (OK)
pandas >=1.1.1                :  1.3.5 (OK)
scipy >=0.17.0                :  1.7.3 (OK)
sympy >=0.7.3                 :  1.9 (OK)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:37 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Sep 21, 2022

Should I do a PR with the change on ipykernel @ccordoba12 ?

Yeah, if that fixes the problem, please do that @dalthviz. Also, after a new ipykernel version is released with your fix, please add a test here to be aware of possible regressions due to future changes on that project. That PR is the one that’s going to close this bug.

1reaction
ccordoba12commented, Sep 2, 2022

@dalthviz, I think we need to update the Tkinter binaries packaged with the installer to be the same ones used in the Python 3.8.10 version that we’re using to build it now (it seems we’re still packaging the ones for Python 3.7).

If after that this problem persists, then I’d suggest to show a message in the console saying that debugging doesn’t work with the Tkinter backend and that users need to switch to a different one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with destroy in tkinter under Anaconda Spyder
1 Answer 1 · Go to. Tools > Preferences > IPython console > Graphics. and deactivate the option called Activate support . ·...
Read more >
backend tkagg is interactive backend. turning interactive mode ...
plot() when I'm exploring data in the REPL under the DEBUG CONSOLE tab. The problem is, not every program has that import line,...
Read more >
Debugger — Spyder 5 documentation
Spyder's debugger offers syntax highlighting, code completion and command history, which work exactly like they do in the normal interactive interpreter. Use ......
Read more >
How To Make A GUI In Python | Best GUI Framework In Python
Edureka Python Training: https://www.edureka.co/python-programming-certification-training/This Edureka video on "Python GUI" will walk you ...
Read more >
Getting Started with Thonny MicroPython (Python) IDE for ...
If you want to program your ESP32 and ESP8266 with MicroPython firmware, it's very handy to use an IDE. In this guide, we'll...
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