View Single Post
  #1   Spotlight this post!  
Unread 27-09-2015, 12:12
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
[FTC]: How to debug the Android platform

I was playing around with the Robot Controller code and have somehow introduced a run-time exception (null pointer exception). The problem is: I don't know how to debug it. If the phone were connected to the PC, I may be able to do a stack dump and find out where the null pointer exception occurred. But the phone was connected to the robot and all the screen display said was I have a null pointer exception and did not tell me where. I can't run the code when the phone is connected to the PC. How do you debug run-time errors? If I put System.out.print in the code, where does this output to? I know I can do telemetry.addData to send info to the Driver Station but it is not the friendliest way to debug because it is not as flexible as printf and I had to do a format string before calling telemetry.addData.
__________________
Reply With Quote