I inherited some code that is having an issue when importing files only when the app isn't running. I was wanting to see if there was a way to hookup/monitor an app before it runs and be able to step through code.
The problem only comes about when importing starts the app. I seen that I could use DDMS for debugging logcat and the heap but I need to be able to step through the code with the debugger... at least I think I do.
In several latest API version (at least 21+), you can find:
Settings -> Developer options -> Wait for debugger.
which helps you stop for debugger during a debug application's startup
Once the app is running you can go to DDMS processes and click the bug icon. If you need to do it right before early code is run, you could put a sleep in before that code to give you a chance to start debugging your process. But if this sounds like too much trouble, logging is probably a better option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With