在Android Studio

时间:2016-03-21 17:15:08

标签: visual-studio debugging android-studio

在Visual Studio中,我可以调试方法,我可以设置下一个语句来执行。

例如,我可以有一个循环或我正在调试的代码块。我可以在循环之前右键单击一个语句,然后选择"设置下一个语句"并且我的执行点移动到该语句,因此我可以重新跟踪循环或一段代码。

下面举例说明,1是我当前正在调试的行。我可以出于某种原因右键单击第2行并将其设置为下一个语句并且我的调试行移动到那里以便我可以回溯其间的所有行:

public class DictionaryDemo {

   public static void main(String[] args) {

   // create a new hashtable
   Dictionary dict = new Hashtable();

   // add elements in the hashtable
   dict.put("1", "Chocolate"); //<-- 2. I CAN SET THIS AS NEXT STATEMENT
   dict.put("2", "Cocoa");
   dict.put("6", "Coffee");  

   // returns the elements associated with the key
   System.out.println(dict.get("6")); //<-- 1. THIS IS CURRENT DEBUGGING LINE
   }
}

在Android Studio中,我找不到类似的功能。它是否存在于Android Studio中?

0 个答案:

没有答案