BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-25-2008, 02:53 PM   #1
plevintampabay
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8820
PIN: N/A
Carrier: AT&T
Posts: 72
Question Can not display String variables in Eclipse (from the BlackBerry)

Please Login to Remove!

I am trying to use Eclipse in developing and debugging a BlackBerry project. In the debugger, when I have a String, on the Variables tab, the Eclipse debugger only shows the object id --
s == "(id=1139302400)"

If I add an Expression for s.toString() then it shows the correct value.
"s.toString()" = "Hello World!"

Any ideas how to get Eclipse to show the String value without having to enter an expression?

Thanks,
Paul
Offline  
Old 06-25-2008, 10:08 PM   #2
plevintampabay
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8820
PIN: N/A
Carrier: AT&T
Posts: 72
Default

I solved this one. I must admit - I'm really impressed with Eclipse.

Eclipse has a feature called "Detail Formatters" (in Preferences > Java > Debug). I created one for type java.lang.String, giving it the code snippet "toString()".

Now in the Variables tab in the debugger, in the box at the bottom of that tab, it correctly shows the value of the String variable.
Offline  
Old 06-26-2008, 12:43 PM   #3
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

Ah, nice one, dude. I've been looking for a solution to this for a long time. Thanks!
__________________
Do your homework and know how to ask a good question.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Voice Activated Listening Device Audio 150 Day Battery Spy Recorder 16 GB picture

Voice Activated Listening Device Audio 150 Day Battery Spy Recorder 16 GB

$109.00



SIMATIC, Memory Card, 4 Mbytes, 24 Mbytes, 256 Mbytes picture

SIMATIC, Memory Card, 4 Mbytes, 24 Mbytes, 256 Mbytes

$237.75



Avnet UltraZed-EG AES-ZU3EG-1-SOM-I-G Zynq UltraScale+ MPSoC System-on-Module picture

Avnet UltraZed-EG AES-ZU3EG-1-SOM-I-G Zynq UltraScale+ MPSoC System-on-Module

$129.99



New Factory Sealed AB 1756-L61 SER B ControlLogix 2MB Memory Controller 1756L61 picture

New Factory Sealed AB 1756-L61 SER B ControlLogix 2MB Memory Controller 1756L61

$304.69



Nakajima WPT-160 Electronic Portable Typewriter with Display and Memory picture

Nakajima WPT-160 Electronic Portable Typewriter with Display and Memory

$279.99



AVNET ULTRAZED SOM ZYNQ ULTRASCALE+ XCZU3EG SYSTEM ON MODULE -  picture

AVNET ULTRAZED SOM ZYNQ ULTRASCALE+ XCZU3EG SYSTEM ON MODULE -

$98.67







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.