Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i tell if i'm in the debugger under android?

I need a way to check whether or not my android app is currently being debugged (there's a condition we check for on startup that I specifically do -not- want to check when the debugger is running). Does such a beast exist?

like image 769
D Garcia Avatar asked Jan 25 '11 23:01

D Garcia


1 Answers

You need to look at isDebuggerConnected.

But it is considered a very bad practice to make your application's behavior dependent on whether debugger connected or not. This may lead to some hard to catch bugs. So be careful.

like image 145
inazaruk Avatar answered Oct 12 '22 03:10

inazaruk