Studio Studio performance evaluation during debugging

I am new to Android Studio and trying to pull myself together.

My question is: how can I see the meaning of any expression that needs to be questioned?
For example, in the code below, how can I see the value of Message.getText() ?

  if (Message.getText() == null){ Message.setError("Invalid Message");flag=true; } 

I use Eclipse with PyDev, and there I had the opportunity to evaluate any expression during debugging using the print statement.
I'm just wondering if there is equivalent functionality in Android studio.

+15
source share
3 answers

You can simply use the "evaluate expression" button during debugging.

Rate Expression Button

Evaluation of the selected code

+24
source

the ability to evaluate any expression when debugging

Yes. You set a breakpoint and debug, then you can see the expressions evaluate with

0
source

In Xcode , you also have the option of adding an action to a breakpoint (e.g. Log message ). Android studio based on IntelliJ IDEA also has the same feature

enter image description here

Find out more here.

0
source

Source: https://habr.com/ru/post/1268574/


All Articles