I have the following code in my android project I develop using "intellij idea":
Settings.Secure.putInt(this.getContentResolver(),Settings.Secure.ADB_ENABLED, 1);
I have break point next to this line, and when I stop here unfortunately I can not see Static fields of Settings class. I have tried:
Class g1 = Settings.class;
But can not see internals of that class anyway.
What to change in "intellij idea" settings to see those Static fields.
Run the program in debug modeClick the Run icon in the gutter, then select Modify Run Configuration. Enter arguments in the Program arguments field. Click the Run button near the main method. From the menu, select Debug.
IntelliJ IDEA provides a debugger for Java code. Depending on the installed/enabled plugins, you can also debug code written in other languages. During a debugging session, you launch your program with the debugger attached to it.
By default, the Debug tool window opens when your program hits a breakpoint and is not hidden when the session is terminated. To change this behavior, clear the Show debug window on breakpoint checkbox on the Build, Execution, Deployment | Debugger page of the IDE settings Ctrl+Alt+S .
When you hit a breakpoint, in the Debugger
tab of your debug instance, right-click on any variable, then choose Customize Data Views
and make sure Static field
(and Static final fields
, depending on your needs) are checked.
See https://www.jetbrains.com/idea/webhelp/customize-data-views.html for more info.
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