Remote Debugging and stdout

M Grimm
2009-01-22
2013-03-15
  • M Grimm

    M Grimm - 2009-01-22

    Hi,

    I'm testing the remote-debugging feature of pydev for our needs.
    So I have such situation:

    Eclispe 3.4 with Python 2.5.4 on Windows XP and Pydev 1.4.2 (incl extension) is the machine where the debug-server listens.

    Remote System: Linux with Python 2.6.1, the system where the debug-file is executed.

    I set the debugger on the remote system with

    import pydevd;pydevd.settrace('10.1.1.228', True, True, 5678, True)

    the debugger starts up. Everything works fine, but I only see the stderr-output in the IDE-Console.
    print-output on stdout are not shown.
    Whats's wrong ? As I see, the paramters of the settrace()-method are correct ?

    Thanks,
    Markus

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2009-01-23

      It appears fine to me...

      Have you checked if your application is not redirecting the output itself? If the application changes the stdout, pydev is not able to do that redirection.

      Cheers,

      Fabio

       
    • M Grimm

      M Grimm - 2009-01-27

      hm... redirecting the output? I don't know how... :))
      It's a simple script like this:

      # -*- coding: utf-8 -*-
      import sys

      if __name__ == '__main__':
          sys.path.append("debug")
          print "setting trace"
          import pydevd;pydevd.settrace('10.1.1.228', True, True, 5678, True)
         
          testvar = "Hello World"
          print testvar

      How a redirect could happen ?

      Thanks,
      Markus

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2009-01-28

        You're right... it should work there... What can be happening is that as print testVar is the last statement, and right after that the debugging ends, what can be happening is that the process dies before that message is sent (I must check if that's it).

        Just to clear that, try doing some more prints before ending to see if it comes through.

        Cheers,

        Fabio

         
    • M Grimm

      M Grimm - 2009-01-28

      Hi Fabio,

      that's it. with two print statements the first one comes out.

      Thanks,
      Markus

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks