[wingide-users] Debugging remote launched script

Marcin Krol mrkafk at gmail.com
Thu Mar 4 09:31:35 MST 2010


Hello everyone,

I'm having trouble setting up debugging remote script *where start is 
initiated by remote script* (it's a normal script, not mod_python 
handler or smth like that).

Now debugging with process started by IDE works. However, then the 
execution reaches import of extension that is available on Linux only 
(and I'm on windows with IDE) and that obviously stops debugging. So 
debugging remotely launched script is my only option.

Setup:

192.168.50.1 - My windows machine with IDE

192.168.50.101 - Virtual machine with RH 5.3 Linux

I have enabled kExitOnFailure and kLogFile:

Linux RH (192.168.56.101) [17:41] root /var/www/html/tmp # ./demo.py
Traceback (most recent call last):
   File "./demo.py", line 3, in ?
     import wingdbstub
   File "/var/www/html/tmp/wingdbstub.py", line 242, in ?
     raise ValueError('Not connected')
ValueError: Not connected

kLogFile below.

The thing is, I CAN connect from Linux (192.168.50.101) to Windows 
192.168.56.1:


Linux RH (192.168.56.101) [17:41] root /var/www/html/tmp # telnet 
192.168.56.1 50005

Trying 192.168.56.1...
Connected to 192.168.56.1 (192.168.56.1).
Escape character is '^]'.
fsafsa
(K(J)tqt.Connection closed by foreign host.

When I do that on linux, the Wing IDE shows smth about "listening for 
connections" before closing connection initiated from my linux machine. 
So it seems like the linux machine can connect to my windows machine.


kLogFile:


================================================================================
Wing IDE Debug Log File
This file can be used to diagnose problems in debugger internals
For help, contact support at wingware.com
================================================================================

--------------------------------------------------------------------------------
STARTING NEW DEBUG LOGGING SESSION
--------------------------------------------------------------------------------
wingdbg - 2010/03/04 18:15:13 - 'netserver CLOSECHANNEL'
wingdbg - 2010/03/04 18:15:13 - 'Bound attach listener to port' 50015
wingdbg - 2010/03/04 18:15:13 - '******************** START DEBUG 
************************'
wingdbg - 2010/03/04 18:15:13 - 'ABOUT TO INIT'
wingdbg - 2010/03/04 18:15:13 - 'SET UP C CORE'
wingdbg - 2010/03/04 18:15:13 - 'RESET'
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'abstract' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/abstract.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/abstract.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'constants' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/constants.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/constants.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'dbgserver' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/dbgserver.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/dbgserver.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'dbgutils' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/dbgutils.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/dbgutils.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'_extensions' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_extensions.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_extensions.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'findmodules' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/findmodules.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/findmodules.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'netserver' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/netserver.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/netserver.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'channel' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/channel.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/channel.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'dbginspect' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/dbginspect.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/dbginspect.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'_gtkhooks' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_gtkhooks.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_gtkhooks.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'_zopehooks' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_zopehooks.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_zopehooks.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'_tkinterhooks' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_tkinterhooks.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_tkinterhooks.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'_wxhooks' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_wxhooks.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_wxhooks.py'"
wingdbg - 2010/03/04 18:15:13 - 'Registering internal module: ' <module 
'_wx25hooks' from 
'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_wx25hooks.pyc'> '; ' 
"'/usr/lib/wingide3.2/bin/2.4/src/debug/tserver/_wx25hooks.py'"
wingdbg - 2010/03/04 18:15:13 - 'setting __fClient to' 
<netserver.CNetworkServer instance at 0xb7f5ce8c>
wingdbg - 2010/03/04 18:15:13 - 'RESET'
wingdbg - 2010/03/04 18:15:13 - 'Connecting to client...'
wingdbg - 2010/03/04 18:15:13 - 'Could not connect to debug client'
wingdbg - 2010/03/04 18:15:13 - 'Runtime failure details:'
wingdbg - 2010/03/04 18:15:13 - 'Exception: socket.error'
wingdbg - 2010/03/04 18:15:13 - "Value = (111, 'Connection refused')"
wingdbg - 2010/03/04 18:15:13 - 'Traceback (innermost last):'
wingdbg - 2010/03/04 18:15:13 - '  File 
"2.4/src/debug/tserver/netserver.pyc", line 1283, in __ConnectToClient\n'
wingdbg - 2010/03/04 18:15:13 - '  File 
"2.4/src/debug/tserver/channel.pyc", line 276, in Connect\n'
wingdbg - 2010/03/04 18:15:13 - '  File "<string>", line 1, in connect\n'
wingdbg - 2010/03/04 18:15:13 - 'netserver CLOSECHANNEL'
wingdbg - 2010/03/04 18:15:13 - 'Starting non-client run'
wingdbg - 2010/03/04 18:15:13 - 'STARTING DEBUG'
wingdbg - 2010/03/04 18:15:13 - '__CheckFloatingPointMode'
wingdbg - 2010/03/04 18:15:13 - 'RESET'
wingdbg - 2010/03/04 18:15:13 - '_CB_DebugThread called with thread_id 
=' -1208166720
wingdbg - 2010/03/04 18:15:13 - '_CB_DebugThread returning' 1
wingdbg - 2010/03/04 18:15:13 - 'CHECK FOR CONNECTION'
wingdbg - 2010/03/04 18:15:13 - 'LISTENER INFO:' ('0.0.0.0', 50015)
wingdbg - 2010/03/04 18:15:13 - 'SELECT RESULT' [] [] []
wingdbg - 2010/03/04 18:15:13 - 'CONTINUE'
wingdbg - 2010/03/04 18:15:13 - 'USER EXCEPTION'
wingdbg - 2010/03/04 18:15:13 - 'ValueError:' 'Not connected'
wingdbg - 2010/03/04 18:15:13 - 'Traceback:'
wingdbg - 2010/03/04 18:15:13 - '  File "./demo.py", line 3, in ?\n 
import wingdbstub'
wingdbg - 2010/03/04 18:15:13 - '  File 
"/var/www/html/tmp/wingdbstub.py", line 242, in ?\n    raise 
ValueError(\'Not connected\')'
wingdbg - 2010/03/04 18:15:13 - '_BlockUntilReadyToRun: <frame object at 
0x92a2df4>'
wingdbg - 2010/03/04 18:15:13 - '  filename = ./demo.py, lineno = 3'
wingdbg - 2010/03/04 18:15:13 - 'USER EXCEPTION IN BLOCKUNTILREADYTORUN'
wingdbg - 2010/03/04 18:15:13 - 'SENDING PROGRAM STOPPED ON EXCEPTION' 
<netserver.CNetworkServer instance at 0xb7f5ce8c>
wingdbg - 2010/03/04 18:15:13 - 'NETSERVER PROGRAM STOPPED'
wingdbg - 2010/03/04 18:15:13 - 'QUIT=FALSE'
wingdbg - 2010/03/04 18:15:13 - 'THREADS=' [(153538992, u'MainThread', 0)]
wingdbg - 2010/03/04 18:15:13 - 'CURRENT THREAD=' 153538992
wingdbg - 2010/03/04 18:15:13 - 'STACK =' 
[((u'/var/www/html/tmp/demo.py', 3, u'import wingdbstub\n', u'?', 
[u'db', u'mk', u'sys', u'r', u'wingdbstub', u'vw', u'Mk4py']), 3), 
((u'/var/www/html/tmp/wingdbstub.py', 246, u"      raise ValueError('Not 
connected')\n", u'?', [u'kPWFileName', u'kLogFile', u'exit_on_fail', 
u'debugger', u'colonpos', u'pwfile_path', u'very_verbose_log', 
u'has_key', u'_ImportWingdb', u'kExitOnFailure', u'port', 
u'kWingDebugDisabled', u'kAttachPort', u'kEmbedded', u'kLogVeryVerbose', 
u'WINGHOME', u'imp', u'kPWFilePath', u'kWingHostPort', u'wingdb', 
u'sys', u'attachport', u'host', u'logfile', u'pwfile_name', 
u'netserver', u'err', u'embedded', u'kUserSettingsDir', u'hostport', 
u'os']), 242)]
wingdbg - 2010/03/04 18:15:13 - 'FRAMEIDX' 0
wingdbg - 2010/03/04 18:15:13 - 'CHECK FOR CONNECTION'
wingdbg - 2010/03/04 18:15:13 - 'LISTENER INFO:' ('0.0.0.0', 50015)
wingdbg - 2010/03/04 18:15:13 - 'SELECT RESULT' [] [] []
wingdbg - 2010/03/04 18:15:13 - 'CHECK FOR CONNECTION'
wingdbg - 2010/03/04 18:15:13 - 'LISTENER INFO:' ('0.0.0.0', 50015)
wingdbg - 2010/03/04 18:15:13 - 'SELECT RESULT' [] [] []
wingdbg - 2010/03/04 18:15:13 - 'CONTINUE'
wingdbg - 2010/03/04 18:15:13 - 'ProgramQuit called'
wingdbg - 2010/03/04 18:15:13 - 'STOPPING DEBUG'
wingdbg - 2010/03/04 18:15:13 - 'RESET'
wingdbg - 2010/03/04 18:15:13 - 'setting __fClient to' None
wingdbg - 2010/03/04 18:15:13 - 'RESET'
wingdbg - 2010/03/04 18:15:13 - 'netserver CLOSECHANNEL'
wingdbg - 2010/03/04 18:15:13 - 'Closing attach listener socket'
wingdbg - 2010/03/04 18:15:13 - 'EXITING TO RUN'


Regards,
mk


More information about the wingide-users mailing list