[Eric] Debugger (no connection)

Albert Zeyer albert.zeyer at rwth-aachen.de
Sat Sep 13 14:03:39 BST 2008


Hi,

I am new to Eric but I like the IDE as far as I have explored it. I  
though have some problems.

My environment: Eric 4.2.1 (r2426) on MacOSX with Python 2.5.1.

The problem: The debugger stopped working. (I think it has worked at  
the very beginning, at least I cannot remember that I have seen the  
error message there.) The first thing after I start the IDE is the  
following message in the Log-viewer:

Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClient.py", line 38, in <module>
debugClient.main()
File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 1858, in main
self.connectDebugger(port, remoteAddress, redirect)
File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 960, in connectDebugger
sock.connect((DebugAddress,port))
File "<string>", line 1, in connect
socket.error: (49, "Can't assign requested address")

I also get the same message in the Shell:

StdErr: Traceback (most recent call last):
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClient.py", line 38, in <module>
     debugClient.main()
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 1858, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 960, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (49, "Can't assign requested address")

This comes right after the start. But also when I try to debug any  
script, I get this message again and the debugger also seems not to  
work.

I browsed a bit through the code of Eric4 to understand the debugging  
system. It seems that the IDE is starting a debug-server (the  
DebugServer class) which is built into the IDE and then it starts an  
external Python tool, the DebugClient, which connects over a TCP port  
to the DebugServer. The DebugServer provides all debugging functions  
and the DebugClient controls that.

I wondered now a bit about the message from DebugClient. "Can't assign  
requested address" normally only appears if you used a invalid port  
number, like 0. On all other ports, it should give the message  
"Connection refused". I also tried that myself:

Macintosh:~ az$ python /Library/Python/2.5/site-packages/eric4/ 
DebugClients/Python/DebugClient.py 1
Traceback (most recent call last):
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClient.py", line 38, in <module>
     debugClient.main()
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 1858, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 960, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (61, 'Connection refused')

And:

Macintosh:~ az$ python /Library/Python/2.5/site-packages/eric4/ 
DebugClients/Python/DebugClient.py 0
Traceback (most recent call last):
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClient.py", line 38, in <module>
     debugClient.main()
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 1858, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File "/Library/Python/2.5/site-packages/eric4/DebugClients/Python/ 
DebugClientBase.py", line 960, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (49, "Can't assign requested address")

Then, to go further, I tried to figure out on which port the server  
was listening. I browsed through the code and it seems that the server  
just uses a random port (it does not specify that). I thought I  
perhaps try out to connect to that port manually with the DebugClient.  
But it seems that the server was not correctly started, because Python  
has not opened any port:

Macintosh:~ az$ lsof -i -P | grep -i python
Python    24119   az    8u  IPv6 0x3e524bc      0t0  TCP *:* (CLOSED)

Any suggestions?

Thanks,
Albert



More information about the Eric mailing list