Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between debugging and running the debug variant?

In Android Studio, you can "Run" or "Debug" your application using these buttons:

Run and Debug in Android Studio

Also, you can choose a debug or release build variant in the Build Variants window:

Build Variants window

What's the difference between pressing the Debug button and choosing the debug variant, or pressing the Run button and choosing the release variant? Would it make any difference if I debug the debug or the release version?

like image 523
Juan Avatar asked Jan 15 '16 03:01

Juan


1 Answers

The build variant generally describes how the application gets built - for example the debug variant builds a debug-able application whereas the release variant is optimized, signed and does not support debugging.

  • Run simply launches the application (regardless of what the flavor is).
  • Debug essentially does the same thing but will stop at any breakpoints that you might have set ...
like image 80
Owais Ali Avatar answered Oct 26 '22 02:10

Owais Ali