embedded scripts debugging

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrey Tatarinov

    #1

    embedded scripts debugging

    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?
  • Miki Tebeka

    #2
    Re: embedded scripts debugging

    Hello Andrey,
    [color=blue]
    > 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?[/color]
    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 <miki.tebeka@zo ran.com>

    The only difference between children and adults is the price of the toys

    Comment

    • Andrey Tatarinov

      #3
      Re: embedded scripts debugging

      Miki Tebeka wrote:[color=blue][color=green]
      >>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?[/color]
      >
      > 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.[/color]

      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

      Comment

      Working...