Home Help Center

Debugging in Python

msw10100msw10100 Member Michael WatsonOrganization: National Instruments, Inc.Project: Datacomm
Hi,

I use ActiveState's Komodo for most of my Python work, and I use its debugger extensively. I can use it for debugging my client-side Ice programs, but when I start Komodo's debugger against my python-based server, none of my breakpoints trigger when the servant methods are dispatched. So,

(1) Do any of you know of any way to use breakpoints with dispatched servant methods in Komodo?

(2) Do any of you use a different Python IDE whose breakpoints work for debugging Ice servers?

Thanks!

- - Michael Watson

Comments

  • msw10100msw10100 Member Michael WatsonOrganization: National Instruments, Inc.Project: Datacomm
    State of Python multi-threaded debugging support

    Ah. Ok, I've done a bit more research and found that there appears to be little support for multi-threaded debugging built into Python just now. There are all kinds of hints that support in the core language is to be added soon, but there's little detail. Komodo 3.1 claims to support it, but I can't find anything about such support in the 3.1 documentation.

    Some people have written various tools or scripts to enable multi-threaded debugging, so I'll start investigating the various options. If I have success, I'll post it here.

    If anyone here has had some success with a particular method, I'd very much appreciate learning about it.

    Cheers!

    - - Michael Watson
  • lsteplstep Member
    Maybe with this one...

    There is specially made debugger for multi-threaded python applications named rpdb (http://rpdb.digitalpeers.com/ ), which recently was upgraded with a really nice GUI named winpdb. It is available here.

    Hope this helps,
    Luc
  • msw10100msw10100 Member Michael WatsonOrganization: National Instruments, Inc.Project: Datacomm
    Neat

    Luc,

    Many thanks for the debugger reference! I'll check it out this week!

    Cheers!

    Michael W.
  • ckohnertckohnert Member
    Has anyone figured out if there's a Trace level setting or other debug enabling feature that will let me see the backtrace for server thrown unknown exceptions?

    For example I call from the client, have a typo in some part of the servant implementation, an exception is thrown, and I (correctly) see this as an UnknownException in the client. However, looking at the server output in the terminal it's running in, it does not include the backtrace in the warning it prints out so it can be difficult to locate exactly where in the servant the exception was thrown.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Has anyone figured out if there's a Trace level setting or other debug enabling feature that will let me see the backtrace for server thrown unknown exceptions?
    I'm afraid that's not currently possible, but I'll add this to our TODO list.

    Take care,
    - Mark
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Update

    The next Ice release will include a solution for this. See here for more information.

    - Mark
  • pjtaitpjtait Member Philip TaitOrganization: Subaru TelescopeProject: Fibre-Fed Multi-ObjectSpectrograph;HyperSuprimeCam ✭✭
    rpdb2 debugger: no luck so far
    lstep wrote: »
    There is specially made debugger for multi-threaded python applications named rpdb (digitalpeers.com - digitalpeers Resources and Information. This website is for sale!), which recently was upgraded with a really nice GUI named winpdb. It is available here.

    Hope this helps,
    Luc

    Has anyone found a recipe for using winpdb/rpdb2? Any other recommendations?
Sign In or Register to comment.