[Eric] Debugger (no connection)

Detlev Offenbach detlev at die-offenbachs.de
Sat Sep 13 14:43:04 BST 2008


Hi,

I don't have any Mac OS X around here, so eric4 is untested (at least by me) 
on that platform. However, I will assist you in debugging the problem.

1) Please check in the debug client, which address and port it is given by the 
debug server. Insert a print statement in the main() method and print 
sys.argv.

2) You may change the debug server to passive mode using the configuration 
dialog and connect the client manually tp port 42424 (the default).

3) If your system is using only IPv6, the call in line 960 may fail because 
DebugAddress is assigned the localhost IP 127.0.0.1 (IPv4). It is defined on 
line 11 in DebugProtocol.py. If you're using IPv6, try changing it to "::1".

Regards,
Detlev

On Samstag, 13. September 2008, Albert Zeyer wrote:
> 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
>
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric



-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list