Well, the Python feature you're referring to is probably this: "pdb.set_trace() Enter the debugger at the calling stack frame. This is useful to hard- code a breakpoint at a given point in a program, even if the code is not otherwise being debugged (e.g. when an assertion fails)."
Despite the Python documentation using the word "useful", I'd claim it's only useful because Python lacks any other way to set a breakpoint on assertion failure. In Java, you can set a breakpoint on AssertionError, or any other set of exceptions and errors you wish. I normally have one set on Error, and often set one on RuntimeException as well. You cannot enter the debugger if the program is not being debugged. However, I've never wanted a production app to drop into the debugger! You can attach a debugger to a running process, even a production one, if you enable that in advance. (This is the default in Android in the emulator, and can be enabled in the manifest otherwise). In Eclipse, your breakpoints are preserved in your workspace automatically. You do not need to manipulate a configuration file. But, while it seems to be omitted from the documentation, typing '?' at jdb shows this info at the end: "Startup commands can be placed in either "jdb.ini" or ".jdbrc" in user.home or user.dir" On Dec 15, 11:47 am, Tobiah <[email protected]> wrote: > On 12/15/2010 10:53 AM, Frank Weiss wrote: > > > Are you debugging Android OS or Android SDK code? > > Just a small app I'm writing using the SDK. > > In Python, or PHP, I can issue a call in the code > that becomes a breakpoint. I'm just hoping that > there is a way to do that for android. > > I heard somewhere that I could list the > breakpoints in a config file somewhere, > but I can't find that reference anymore. > > Thanks, > > Toby -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

