how to debug python's extend module written in c/c++ on windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tcfg@sina.com

    how to debug python's extend module written in c/c++ on windows

    dear all:

    I have searched the debug informations of many python's IDE, but I
    cannot find the method about debuging the extend module written in
    Visual studio 2008 on windows.
    The wingIDE tell me that we can debug the extend module on linux, but
    cannot on windows. and using wingdbstub.py we can embed python into
    other's source code but not extending.
    Who can tell me the skills, I appreciate!


    best regards

    fang
    2008.07.17
  • Diez B. Roggisch

    #2
    Re: how to debug python's extend module written in c/c++ on windows

    tcfg@sina.com schrieb:
    dear all:
    >
    I have searched the debug informations of many python's IDE, but I
    cannot find the method about debuging the extend module written in
    Visual studio 2008 on windows.
    The wingIDE tell me that we can debug the extend module on linux, but
    cannot on windows. and using wingdbstub.py we can embed python into
    other's source code but not extending.
    Who can tell me the skills, I appreciate!
    I use plain gdb (aka the C-debugger) for this purpose. Create a small
    test-script that exposes the error you want to debug, and then start the
    python interpreter in the debugger. Set breakpoints, or watch backtraces.

    I can't comment on how that works on VS08 though - but it shouldn't be
    to hard.

    Diez

    Comment

    • tcfg@sina.com

      #3
      Re: how to debug python's extend module written in c/c++ on windows

      dear Diez:

      I need step into c function in extending module(DLL) when debugging
      the script. and I want Single-step debugging the extend module itself,
      but python script Launched The whole process.

      best regards

      fang

      Comment

      • Diez B. Roggisch

        #4
        Re: how to debug python's extend module written in c/c++ on windows

        tcfg@sina.com schrieb:
        dear Diez:
        >
        I need step into c function in extending module(DLL) when debugging
        the script. and I want Single-step debugging the extend module itself,
        but python script Launched The whole process.
        That is exactly what attaching a C-debugger to python will give you. Did
        you actually try it? Do you know how to debug C-programs?

        Diez

        Comment

        • fang

          #5
          Re: how to debug python's extend module written in c/c++ on windows

          Dear Diez:

          It is attaching a C-debugger to python. I can attach python-
          debugger(for example:wingIDE ) to c-debugger(for example:VS2008) , but I
          cannot attach VS2008 to wingIDE. I need both python statement and c
          statement can be single-step debugged.

          best regards

          fang

          Comment

          • Diez B. Roggisch

            #6
            Re: how to debug python's extend module written in c/c++ on windows

            fang wrote:
            Dear Diez:
            >
            It is attaching a C-debugger to python. I can attach python-
            debugger(for example:wingIDE ) to c-debugger(for example:VS2008) , but I
            cannot attach VS2008 to wingIDE. I need both python statement and c
            statement can be single-step debugged.
            AFAIK that's not possible. First of all, *don't* attach VS2008 to WingIDE,
            use VS2008 to start a python-interpreter with commandline-args (at least
            that's how it works for me in gdb)

            And then write only small python-scripts that expose an actual error in the
            DLL, and debug these.

            Diez

            Comment

            • fang

              #7
              Re: how to debug python's extend module written in c/c++ on windows

              Dear Diez:

              I see. I appreciate your help really.


              best regards


              fang

              Comment

              Working...