Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BlackBerry on-device debugging does not show string values

Tags:

blackberry

On simple button click in BlackBerry I am writing this:

String str = "xyz";
labelField.setText(str);

When I debug the code, under the "Variables" window I cannot see value of 'str' as 'xyz' -- it is showing value of str equal to null and when I click over it, it is showing this message:

Method "toString" with signature "()Ljava/lang/String; is not applicable on this object

though the code is working fine. What is the problem in debug mode?

like image 453
Aditya Mehta Avatar asked Nov 06 '22 03:11

Aditya Mehta


1 Answers

Hey guys I think I have the solution for you.

Since I was having the same problem and was looking arround to find some answers (and didn't find any) I tried to just solve it by the trial-error method.

To cut the long story short: Check if you accidently have deleted your emulator *.debug files. For example I've had deleted mine (don't ask why :) ), so after I restored the whole simulator folder within the RIM JDE I've tried to debug again and voila - I could now see the values of the variables.


This is the location of the simulator folder within my BB JDE Eclipse Plugin (The standalone version that contains eclipse itself). The used BB JDE is 4.5.0 but the same folder structure is found on any JDE version.

C:\Users\GDimitrov\Documents\programs\bb_jde_plugin\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.28\components\simulator

And this is the location of the simulator folder for the BB JDE 4.5.0 installed additionally through the BB installer.

C:\Program Files (x86)\RIM\BlackBerry_JDE_4.5.0\simulator

Cheers

like image 141
Georgi Dimitrov Avatar answered Nov 11 '22 21:11

Georgi Dimitrov