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: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Get the event log as a file

And how can i get the event log of my simulator as a file?

 

Retired
Posts: 76
Registered: ‎07-11-2008
My Device: Z10

Re: Get the event log as a file

You can use javaloader and simulate a usb connection. See the earlier post by kzettel for details.
Sarim
BlackBerry Development Advisor
www.BlackBerryDeveloper.com
Developer
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Get the event log as a file

you mean this?

 

javaloader.exe -u eventlog > eventlog.txt

 

 

I get an Error:unable to open port...

BlackBerry Development Advisor
Posts: 14,950
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Get the event log as a file

Ensure that the BlackBerry Simulator is not connected to the debugger when you use javaloader, otherwise it will usually fail.  This means you'll need to start the BlackBerry Simulator outside of the BlackBerry JDE or BlackBerry JDE Plug-in for Eclipse by running the batch file in the simulator directory.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 83
Registered: ‎02-17-2009
My Device: Not Specified

Re: Get the event log as a file

Yes thank you, that was it.

 

Regards

New Contributor
Posts: 8
Registered: ‎03-28-2010
My Device: BlackBerry 8900

Re: Get the event log as a file

"The BlackBerry® JVM is optimized to eliminate the stack trace if it locates code that catches the exception using catch (Exception e). It does not eliminate the stack trace if your application catches the Throwable exception."

 

I am a bit confused, I try to catch throwable but the simulator behaves as if I am not catching the exception. If I am in non debugger run then I get the exception window (although I am catching the throwable) and if I am in the debugger attached run then Eclipse goes to the debugger mode with stacktrace view, again like I am not catching the exception. Am I missing something here?

New Contributor
Posts: 3
Registered: ‎09-06-2011
My Device: Storm 2

Re: Get the event log as a file

I think we've all missed something. Why do we have to think about getting a stack trace in BlackBerry applications? Why do we have to be confused? Have a look on other mobile platforms, dedicated development environments and programming solutions. Is there any problem of that? Does a Windows Phone 7 programmer have to think about how to find where can be this NullPointerException? Does JavaME programmer have to trouble when he notice any exception? No, because someone provided a BASIC solutions to that problems. Because someone DID a job to make things easier. And that "someone" doesn't work in RIM. Too bad.

I really like to write applications on BlackBerry devices, but I am really depressed when I compare how I am treated as a programmer, when I use BlackBerry developer environments and emulators given to me. It's really sad that people who want us to write BlackBerry applications don't respect us and they give us a **bleep**.

Don't you think it is discouraging people to be a BlackBerry programmer?

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Get the event log as a file

Welcome to the forum. 

 

I'm not sure you fully understand the situation with respect to stack traces. 

 

AFAIK, if an uncaught exception is thrown while you are debugging, the execution stops at that point and you can debug.  So you don't need a stack trace.  An uncaught exception on the device when not being debugged does generate a stack trace.  The only issue is when you have a try catch around a section of code, and you catch an Exception, that does not generate a stack trace unless you catch Throwable.  So catch Throwable if you need the stack trace.  You are writing the try/catch anyway!

 

Sorry, I can't comment on coding on other platforms in general, because I don't.   But if you have any other specific issues with the BlackBerry development environment, please bring them up, perhaps they are misunderstandings too. 

New Contributor
Posts: 3
Registered: ‎09-06-2011
My Device: Storm 2

Re: Get the event log as a file

[ Edited ]

Okay, so my problem is using plugin for eclipse. There where many situations in which i saw white screen on emulator with caption similar to "NullPointerException" or "IllegalStateException". So, I thought that development environment will help me to point where in my code that exception was thrown and what issues caused that exception. In that case a stack trace is very helpful. You can examine that stack and easily notice after which list of actions there happened a wrong one.

That basic function exists in many other IDEs like NetBeans (JavaME programming) or Visual Stuido (.NET CF programming), so I'm just surprised when I see questions on this forum like "Man, how can I find in which place of my code my application is mistaken, when it throws an exception?"

It's like when you see an exception occured on emulator screen it gives you none information. It's like you read "Hi, I am emulator, your program went wrong and I will not help you to find out why"

 

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Get the event log as a file

Yes I can imagine you will find that frustrating.  Sorry I use JDE (for historical reasons) and I don't suffer some of the problems that I see people reporting - like how to I download JDE 5.0 - and I can't say I've seen a "White screen of death" with nothing useful in my debugging. 

 

Good luck with your Eclipse plug-in battles.  I'm going to wait for the dust to settle before I move to Eclipse....