Commit 57e33ce
authored
Add snippet for enabling diagnostic stack traces (#712)
* Add snippet for enabling diagnostic stack traces
Demo how to enable diagnostic stack traces in Jetpack Compose for improved debugging.
The snippet shows how to conditionally enable `ComposeStackTraceMode.Auto` in the `Application.onCreate` method for debug builds, while keeping it disabled in release builds to avoid performance overhead.
* Apply Spotless
* Set to use Auto, no debug toggle
* Apply Spotless
* For debug, use SourceInformation, otherwise Auto
* Apply Spotless
* Remove duplicate copyright
* Switch back from alpha BOM
* Update to new recommendations
* Add super call
* Apply Spotless
* Add comment about enabling stacktraces at onCreate level
---------
Co-authored-by: riggaroo <9973046+riggaroo@users.noreply.github.com>1 parent 3f4078e commit 57e33ce
File tree
1 file changed
+37
-0
lines changed- compose/snippets/src/main/java/com/example/compose/snippets/performance
1 file changed
+37
-0
lines changedLines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments