beeware / bugjar

A interactive graphical debugger for Python code.
BSD 3-Clause "New" or "Revised" License
249 stars 31 forks source link

Bugjar doesn't seem to load on Windows 7 #2

Open mstave opened 11 years ago

mstave commented 11 years ago

bugjar myapp.py

Listening on 0.0.0.0:3742 for a bugjar client Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it

And it just keeps repeating that. Python 2.7.3, used "pip install bugjar". I tried disabling firewall, etc.

freakboy3742 commented 11 years ago

Thanks for the report @mstave -- I've had reports of bugjar working on Windows, so it sounds like there's something specific going on here -- at a guess, it's a firewall getting in the way. Under the hood, Bugjar uses a subprocess to do the instrumentation of the running programme; communication then happens over port 3742. If that ports can't accept connections, then you'll have problems.

If that hint gives you any luck in working out how to get bugjar working, let me know; otherwise I'll get around to looking at this when I get a chance. Unfortunately, I don't spend a whole lot of time on Windows myself.

jakekreider commented 11 years ago

On my Win7 box, I can get into bugjar and pause at a breakpoint, but when resuming (or if running a script through with no breakpoints) it freezes until Windows kills it. However, this leaves an orphaned python process that apparently sits on the port, and trying to run bugjar again gets the same "no connection could be made" message above until I manually kill the orphan python.exe. @mstave did you see anything like this or did it fail to launch the from the get-go?

If I get a chance I'll try to get more details on why it's locking up in the first run for me.

damienstanton commented 9 years ago

I am able to reproduce this on Windows 7 64-bit with Python 2.7.8, installed using pip. Bugjar for my file models.py opens fine, but if I set a breakpoint and continue, Bugjar hangs. When I kill it and then attempt to reopen, I get:

PS C:\path> bugjar .\models.py

Listening on 0.0.0.0:3742 for a bugjar client
Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it
Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it
Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it
Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it
Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it
Waiting for connection... [Errno 10061] No connection could be made because the target machine actively refused it

As @mragh mentioned, an orphaned python*32 process is the cause. Once that's killed, Bugjar works as expected.