0

I have breakpoint at a global variable List<> in a Fragment but as soon as my Fragment is added my app hangs in debugging mode. I don't know how to solve this issue.

Code:

public class Syllabus extends Fragment implements SearchView.OnQueryTextListener, LoggerDialog.WhenLoggedIn, ObservableScrollViewCallbacks {
private ObservableRecyclerView recyclerView;
private ImageButton imageButton;
private ProgressDialog dialog;
private static HttpClient httpClient;
private boolean isLoggedIn = false;
private AllSubjectsAdapter adapter;
private ArrayList<SyllabusCourseItem> names;//I have a breakpoint on this variable.
Shahzeb
  • 3,696
  • 4
  • 28
  • 47
Nikhil Verma
  • 1,777
  • 1
  • 20
  • 41

1 Answers1

0

You can't set breakpoint on the field definition.

To see value of variable put breakpoint in some method eg. onCreateView which is called everytime when system need to create the Fragment.

klimat
  • 24,711
  • 7
  • 63
  • 70
  • Actually I was experiencing unexpected removal in my list and i needed to know where that was happening , so how do i do it ? – Nikhil Verma Nov 14 '15 at 12:36
  • Find places when you make method calls on your list and put breakpoints in these places. In Android Studio use alt + F7 to find usages of variable . – klimat Nov 14 '15 at 12:52