you can include the whole area which you think is throwing NPE in a try block and catch it. After catching use printStackTrace(), which will show you the stack trace. eg
try{
arrList.size();//if you think here it is throwing NPE
//some statements
}catch(NullPointerException ne){
ne.printStackTrace();
}
Note:
You should never catch a NPE. Instead before calling the method you should check for null. In the above case you should
if(arrList != null){
arrList.size();
}