Debugging Python Scripts inside other processes

Discussion in 'Python' started by A. Klingenstein, Mar 12, 2005.

  1. I embedded Python in a Windows C++ program. Now I want to debug my
    embedded scripts which of course won't run in any IDE process.
    Commercial IDEs like WingIDE can attach to external processes by
    importing a module in the scripts. Is there a debugger capable of this
    which is Free or Open Source?

    What I need are the following things:
    - runs in Windows
    - single stepping
    - variable watches
    - breakpoints

    Just the typical debugger stuff.

    Alex
     
    A. Klingenstein, Mar 12, 2005
    #1
    1. Advertising

  2. A. Klingenstein

    Robin Becker Guest

    A. Klingenstein wrote:
    > I embedded Python in a Windows C++ program. Now I want to debug my
    > embedded scripts which of course won't run in any IDE process.
    > Commercial IDEs like WingIDE can attach to external processes by
    > importing a module in the scripts. Is there a debugger capable of this
    > which is Free or Open Source?
    >
    > What I need are the following things:
    > - runs in Windows
    > - single stepping
    > - variable watches
    > - breakpoints
    >
    > Just the typical debugger stuff.
    >
    > Alex

    I used hapdebugger for such a purpose some time ago, but I believe it
    needs a special startup python.exe.
    --
    Robin Becker
     
    Robin Becker, Mar 12, 2005
    #2
    1. Advertising

  3. Robin Becker wrote:
    > A. Klingenstein wrote:
    >
    >> I embedded Python in a Windows C++ program. Now I want to debug my
    >> embedded scripts which of course won't run in any IDE process.
    >> Commercial IDEs like WingIDE can attach to external processes by
    >> importing a module in the scripts. Is there a debugger capable of this
    >> which is Free or Open Source?
    >>
    >> What I need are the following things:
    >> - runs in Windows
    >> - single stepping
    >> - variable watches
    >> - breakpoints
    >>
    >> Just the typical debugger stuff.
    >>
    >> Alex

    >
    > I used hapdebugger for such a purpose some time ago, but I believe it
    > needs a special startup python.exe.


    I looked at it, but couldn't get it to work. A special python.exe won't
    work for me since I only link against python24.dll, nothing else

    Alex
     
    A. Klingenstein, Mar 12, 2005
    #3
  4. A. Klingenstein

    Peter Maas Guest

    A. Klingenstein schrieb:
    > I embedded Python in a Windows C++ program. Now I want to debug my
    > embedded scripts which of course won't run in any IDE process.
    > Commercial IDEs like WingIDE can attach to external processes by
    > importing a module in the scripts. Is there a debugger capable of this
    > which is Free or Open Source?
    >
    > What I need are the following things:
    > - runs in Windows
    > - single stepping
    > - variable watches
    > - breakpoints


    Does your Windows C++ program have a working stdin/stdout/stderr,
    i.e. kind of a console? Then you could insert

    import pdb
    pdb.set_trace()

    at a position in your embedded scripts where you want debugging to
    start. If your C++ program doesn't have a console then perhaps you
    can provide one with a Win32 call? Just guessing here.

    --
    -------------------------------------------------------------------
    Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
    E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
    -------------------------------------------------------------------
     
    Peter Maas, Mar 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Rodriguez
    Replies:
    23
    Views:
    1,158
    David Schwartz
    Dec 9, 2003
  2. Jan Danielsson
    Replies:
    8
    Views:
    644
    Mike Meyer
    Jul 22, 2005
  3. Jp Calderone
    Replies:
    0
    Views:
    467
    Jp Calderone
    Jul 21, 2005
  4. davidj411
    Replies:
    0
    Views:
    551
    davidj411
    Jun 27, 2008
  5. Marc Heiler
    Replies:
    1
    Views:
    183
    Robert Klemme
    May 24, 2009
Loading...

Share This Page