I'm looking for the fastest, most efficient way to debug my java application for BlackBerry.
I noticed that it takes forever just to attach the debugger to the device, using a Torch 9800 in my case. Do I have to attach it every single time I make a change to my code, or is there a better way?
I also noticed that in the console, the device seems to be printing a LOT of stuff I don't really care about. Sifting through all this can really be a pain. Is there a way to see only stuff relevant to my application in the console, specifically only things I myself print to it?
Eclipse debugger and profiler, in most cases - the best solution, but in some cases it does not help to find out what is the problem source.
Writing to internal device log via EventLogger class. As an option, if there's a huge amount of data - external text file, located on the device media card (not internal device filesystem).
Using console output window. Unfortunately there's no way to apply a filter on the console output, but there's a way to make work with console easier. Add sequence of symbols at the start of debug messages to distinguish your debug printouts from the system ones. For instance
System.out.println("!!!!!!!!!!!!!!!!!!!!!!! myVar value = " + myVar);
Or that way:
System.out.println("#############################################");
System.out.println("############# object1: " + object1);
System.out.println("############# object2: " + object2);
System.out.println("############# object3: " + object3);
System.out.println("#############################################");
When there's a big amount of debug data in console just copy all console text to a text editor, like Notepad++ and work with it there.
Yes, debugger on most modern simulators takes forever to attach. The newer the simulator, the more time it takes. What I usually do is:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.