embedded scripts debugging

Discussion in 'Python' started by Andrey Tatarinov, Jan 7, 2005.

  1. Hi all.

    I have custom resource editor and wish python to be scripting language
    in it. But I don't want to lose ability of debugging which I currently
    have implementing all logic in C++.

    So the question is: Is there suitable library for simple python gui
    debugger, or may be there are some other techniques for debugging
    embedded scripts?
    Andrey Tatarinov, Jan 7, 2005
    #1
    1. Advertising

  2. Andrey Tatarinov

    Miki Tebeka Guest

    Hello Andrey,

    > So the question is: Is there suitable library for simple python gui
    > debugger, or may be there are some other techniques for debugging
    > embedded scripts?

    What I usually do is add
    from pdb import set_trace
    in the embedded module somewhere and then add a call to set_trace
    (breakpoint) whenever I with.
    When the code reaches the call to set_trace, you'll have pdb prompt and you
    can debug as you like.

    Note that you can't add breakpoint dynamically this way.

    HTH.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <>
    http://tebeka.bizhat.com
    The only difference between children and adults is the price of the toys
    Miki Tebeka, Jan 11, 2005
    #2
    1. Advertising

  3. Miki Tebeka wrote:
    >>So the question is: Is there suitable library for simple python gui
    >>debugger, or may be there are some other techniques for debugging
    >>embedded scripts?

    >
    > What I usually do is add
    > from pdb import set_trace
    > in the embedded module somewhere and then add a call to set_trace
    > (breakpoint) whenever I with.
    > When the code reaches the call to set_trace, you'll have pdb prompt and you
    > can debug as you like.
    >
    > Note that you can't add breakpoint dynamically this way.


    Thanks, I gathered pros and cons of embedding and decided to use python
    extending (i.e. creating python modules) instead of embedding. Happily I
    have an option to choose
    Andrey Tatarinov, Jan 11, 2005
    #3
    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. Jan Danielsson
    Replies:
    8
    Views:
    610
    Mike Meyer
    Jul 22, 2005
  2. Jp Calderone
    Replies:
    0
    Views:
    443
    Jp Calderone
    Jul 21, 2005
  3. Replies:
    1
    Views:
    325
  4. davidj411
    Replies:
    0
    Views:
    481
    davidj411
    Jun 27, 2008
  5. Replies:
    13
    Views:
    513
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page