Debugger

2005-01-26
2013-03-15
  • Hello,

    I am using Eclipse & PyDev for the first time.  Great job on PyDev. Everything seems pretty straight forward.

    I am having problems using debugger on LINUX/Windows. The following errors come up when I try to launch the debugger:

    pydev debugger
    Traceback (most recent call last):
      File "/home/kalyan/eclipse/plugins/org.python.pydev.debug_0.8.5/pysrc/pydevd.py", line 775, in ?
        debugger.connect(setup['client'], setup['port'])
      File "/home/kalyan/eclipse/plugins/org.python.pydev.debug_0.8.5/pysrc/pydevd.py", line 434, in connect
        self.startClient(host, port)
      File "/home/kalyan/eclipse/plugins/org.python.pydev.debug_0.8.5/pysrc/pydevd.py", line 427, in startClient
        except timeout, e:
    NameError: global name 'timeout' is not defined

    Is it a problem only with me?

    regards,
    Kalyan

     
    • Fabio Zadrozny
      Fabio Zadrozny
      2005-01-26

      Which python version are you using?

       
      • version 2.2.3. RHEL3 Update 2

        Kalyan

         
    • Fabio Zadrozny
      Fabio Zadrozny
      2005-01-28

      Hummm.. the problem is the debugger relies on a timeout exception available at python 2.3. So, you basically need python 2.3 or older to use it.

      From python docs:

      exception timeout
      This exception is raised when a timeout occurs on a socket which has had timeouts enabled via a prior call to settimeout(). The accompanying value is a string whose value is currently always ``timed out''. New in version 2.3.

       
    • ah! Thought it could be a version problem. Turns out the same.

      I am not sure if this is mentioned in the requirements section of PyDev.

      Thank You

       
      • Fabio Zadrozny
        Fabio Zadrozny
        2005-01-31

        I'm not sure, but I'll take a look at that...

        Regards,

        Fabio

         
    • Hi,

      I am still unable to use the debugger. I have set the environment (via command prompt and launching eclipse from there and also via system->advanced->env vars) and also PYDEV PYTHONPATh in project preferences. The code completion works like a charm - no problems. It can see my modules and also the module contents. Python shell can import the modules with out any issues.

      However, when i try to run or debug the code, my main script cannot import the same modules.

      Help!

      regards,
      Kalyan

      windows XP SP1, Python 2.4, Eclipse 3.0.1, SUN JAVA 1.5.0_01

       
      • Fabio Zadrozny
        Fabio Zadrozny
        2005-02-17

        You make a simple run through pydev:

        import sys
        print sys.path

        and see if it matches the pythonpath you're expecting.
        If it does not, for some reason, your enviroment PYTHONPATH is still not correctly set... (don't forget to set it all in CAPS).

        Also, after setting in the system->adv->env, you have to reboot eclipse to get the new changes...

        Regards,

        Fabio

         
    • Fabio,

      thank you. turns out the problem is not with importing my modules, but module pwd. I was developing a code for LINUX but wanted to switch to eclipse from Eric and was experimenting with eclipse on my windows laptop. I blindly took the code I was developing and tried it here. I was also catching the ImportError exception and diplaying failed to load modules. It never occured to me that importing system modules might be a problem.

      Thank you.

      Regards,
      Kalyan