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.

debugging threads doesn't work in Spyder

See original GitHub issue

Problem Description

I am trying to debug one of my multi-threaded programs in Python 2.7 with Anaconda distribution on Spyder 3.2 (latest release came from Anaconda package)- when the threads are started, IDE is unable to hit any breakpoints and the program runs in normal mode cannot do step by step debugging either.

  • the same issue I observed in Pycharm as well. however, if I change the python version from Anaconda to normal python which is again ver 2.7, it works perfectly fine in pycharm. The same in Spyder as Ipython and cloud pickle was there.

What steps reproduce the problem?

  1. check any multi-threaded program in Anaconda installation in spyder, try to debug step mode after threads are started.
  2. the same program if you run in a pure python (not Anaconda distribution) and different IDE it works fine.

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

Unable to hit break-points after threads are started

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version: 3.2
  • Python version: 2.7
  • Qt version:
  • PyQt version:
  • Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
cg-mayrhofercommented, Oct 20, 2021

On Spyder 4.2.5 the command import pdb; pdb.set_trace() works and the debugger enters the thread. Thanks to @dalthviz for the advise. Anyway I had to use pdb and not ipdb…

0reactions
CAM-Gerlachcommented, Mar 27, 2019

@dalthviz I had tested pdb.set_trace() and breakpoint() as well, and again debugging stopped at the breakpiont but immediately excited with bdb.BdbQuit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I debug efficiently with Spyder in Python?
When I run my code, I end up in that function's workspace, able to look at what variables are defined etc.. I just...
Read more >
New features in Spyder 4's new debugger!
While debugging a script with a variable named step , for example, typing step in the Pdb prompt will not display the value...
Read more >
Frequently Asked Questions - Numba
When you run a script in a console under Spyder, Spyder first tries to reload existing modules. This doesn't work well with Numba,...
Read more >
Debug multithreaded applications - Visual Studio (Windows)
Visual Studio provides different tools for use in debugging multithreaded apps. For threads, the primary tools for debugging threads are the ...
Read more >
Getting the Debugger to work (5.1.5) - Google Groups
When I first encountered this problem Anaconda had installed Spyder 4.0.1: In this version I got IPdb prompts in the debugger and could...
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