Reputation: 647
I would like to debug an application in Android when I open a file and choose open using my app (e.g. pdf file and my app is able to read pdf). Is it possible?
I tried adding Thread.sleep to launcher activity and attaching debug to running process, but the app crashes.
Regards, Piotr
Upvotes: 0
Views: 56
Reputation: 3853
You can use Debug.waitForDebugger();
just before opening the file and attach a debbuger then.
Look http://developer.android.com/intl/es/reference/android/os/Debug.html#waitForDebugger%28%29
Upvotes: 4
Reputation: 6251
Don'r run and attaching debug to running process.Directly debug.
Upvotes: 0