Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 511
Registered: ‎05-31-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

Hey again- this is my current code, and Content Protection is disabled. I haven't been able to get the debugger to stop at breakpoints when attached to my Bold on startup, but I think register most likely returns true.

 

Again, it logs fine on clicking the app icon, but not on startup. BTW my app is a CLDC app, a system module which of course auto-runs on startup. It has an alternate entry point which is when you click on the icon (and it logs OK), but using the normal entry point, no logging. I didn't think that would be relevant but there it is just in case.

 

Baffled. Please continue to try, much appreciated!

Justin.

 

                EventLogger.register(0x4c9d3452d87922f2L, "MonthlySpend", EventLogger.VIEWER_STRING);
                String logMessage = "main... ";
                if (args != null && args.length > 0)
                    logMessage += args[0];
                    
                if (EventLogger.logEvent(0x4c9d3452d87922f2L, logMessage.getBytes(), EventLogger.ALWAYS_LOG)) {
                    System.out.println("Log Successful!");
                }

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

See if the issue occurs on another device, preferably not a Bold.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

Sorry for the stupid question, but are you sure that your application is definitely run on startup on this Bold? Also, are you sure that the EventLogger code in your application is definitely invoked when the application runs on system startup?
Developer
Posts: 511
Registered: ‎05-31-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

Well, the code after the event logging seems to be called, otherwise the other functionality of the app wouldn't be invoked, and the other functionality works fine. What line of code could I put in to find out for certain that it is running, something I could see somehow on the physical device? Smiley Happy

 

J.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

You could attach the Debugger to an actual BlackBerry...
Developer
Posts: 511
Registered: ‎05-31-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

Hi- yeah I did that already, and I couldn't get it to stop at my breakpoint when I switched the Bold off then back on. Any ideas on how to fix that? Look I appreciate your help, noone else has been able to help...

 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

A typical situation where breakpoints don't work is when your .debug file does not match the .cod file on the device. Make sure that you use the same .debug file that was created the .cod that's on the device was created.
Developer
Posts: 511
Registered: ‎05-31-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

Hi again- I checked and the date/time on the .debug file is the same as on the .cod file. Attaching to the handheld works great and it hits the breakpoint when I click on the icon, but not when I switch the handheld off and back on. To be honest I'm pretty new at BlackBerry programming so I may be doing something wrong. When I attach, I get the message: Cannot find file net_rim_app_manager.debug. Then I get the error No debug info found for module 'net_rim_cldc', Many debugging features will not work properly. Then the same error for 'net_rim_os'. I ignore these as someone said to.

 

Step by step, how do you get a breakpoint to be hit on startup?

 

Tks,

Justin

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

I would say you need to attach the Debugger after the device has started powering up and before it reaches your breakpoint.
Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Help! Logging won't work on Bold 9000 on startup

"I would say you need to attach the Debugger after the device has started powering up and before it reaches your breakpoint."

 

Must be honest, I have never managed to do this.  If I need to debug startup on the device I usually 'frig it', and disable start up, then run my startup code the frist time the icon is pressed.

 

That doesn't help in this case sorry.  I'm still thinking about it.