PC Review


Reply
Thread Tools Rate Thread

Debugging: how to see entire string var value?

 
 
JoeU2004
Guest
Posts: n/a
 
      11th Jul 2009
When I am at a breakpoint, I can hover the cursor over a variable to see its
current value. But if the value of a string variable is "too long" (TBA),
it appears in the box as ``var="blah-blah...``. That is, it is incomplete.

How can I see the entire string value -- and any other values that might be
"too long" and get truncated?

 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Jul 2009
Print it in the Immediate window (Either View/Immediate Window from the VBA
menu bar or, alternately press Ctrl+G, if it is not showing). For example,
if your variable is named 'Var', then just execute this statement in the
Immediate window...

? Var

--
Rick (MVP - Excel)


"JoeU2004" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When I am at a breakpoint, I can hover the cursor over a variable to see
> its current value. But if the value of a string variable is "too long"
> (TBA), it appears in the box as ``var="blah-blah...``. That is, it is
> incomplete.
>
> How can I see the entire string value -- and any other values that might
> be "too long" and get truncated?


 
Reply With Quote
 
JoeU2004
Guest
Posts: n/a
 
      11th Jul 2009
"Rick Rothstein" <(E-Mail Removed)> wrote:
> execute this statement in the Immediate window...
> ? Var


Okay. I hadn't thought about that (klunk!). Thanks.

But I prefer not to do that since it slows down the process of browsing the
current program state.

Is there any way to expand the size of the box that appears when hovering
the cursor -- either permentantly or just for the "current hover"?

For the latter, I am think of some keyboard shortcut such as holding ALT or
CTRL while hovering. But I think I tried that, to no avail.


----- original message -----


"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Print it in the Immediate window (Either View/Immediate Window from the
> VBA menu bar or, alternately press Ctrl+G, if it is not showing). For
> example, if your variable is named 'Var', then just execute this statement
> in the Immediate window...
>
> ? Var
>
> --
> Rick (MVP - Excel)
>
>
> "JoeU2004" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> When I am at a breakpoint, I can hover the cursor over a variable to see
>> its current value. But if the value of a string variable is "too long"
>> (TBA), it appears in the box as ``var="blah-blah...``. That is, it is
>> incomplete.
>>
>> How can I see the entire string value -- and any other values that might
>> be "too long" and get truncated?

>


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Jul 2009
> Is there any way to expand the size of the box that appears when hovering
> the cursor -- either permentantly or just for the "current hover"?
>
> For the latter, I am think of some keyboard shortcut such as holding ALT
> or CTRL while hovering. But I think I tried that, to no avail.


Not that I am aware of.

--
Rick (MVP - Excel)

 
Reply With Quote
 
JoeU2004
Guest
Posts: n/a
 
      11th Jul 2009
"Rick Rothstein" <(E-Mail Removed)> wrote:
>> Is there any way to expand the size of the box that appears when hovering
>> the cursor -- either permentantly or just for the "current hover"?
>> [....]

>
> Not that I am aware of.


Okay. No surprise. Thanks for the confirmation.

PS: I forget to mention that I am using VB 6 with Excel 2003. But I'm sure
that does not make any difference at this point.


----- original message -----

"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>> Is there any way to expand the size of the box that appears when hovering
>> the cursor -- either permentantly or just for the "current hover"?
>>
>> For the latter, I am think of some keyboard shortcut such as holding ALT
>> or CTRL while hovering. But I think I tried that, to no avail.

>
> Not that I am aware of.
>
> --
> Rick (MVP - Excel)


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Jul 2009
I have used both the compiled version of VB6 extensively as well as the VBA
version in Excel and have not found a way to see the contents of a String
variable that contains a lot of text other than printing it out to the
Immediate window.

--
Rick (MVP - Excel)


"JoeU2004" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Rick Rothstein" <(E-Mail Removed)> wrote:
>>> Is there any way to expand the size of the box that appears when
>>> hovering the cursor -- either permentantly or just for the "current
>>> hover"?
>>> [....]

>>
>> Not that I am aware of.

>
> Okay. No surprise. Thanks for the confirmation.
>
> PS: I forget to mention that I am using VB 6 with Excel 2003. But I'm
> sure that does not make any difference at this point.
>
>
> ----- original message -----
>
> "Rick Rothstein" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>> Is there any way to expand the size of the box that appears when
>>> hovering the cursor -- either permentantly or just for the "current
>>> hover"?
>>>
>>> For the latter, I am think of some keyboard shortcut such as holding ALT
>>> or CTRL while hovering. But I think I tried that, to no avail.

>>
>> Not that I am aware of.
>>
>> --
>> Rick (MVP - Excel)

>


 
Reply With Quote
 
Normek
Guest
Posts: n/a
 
      13th Jul 2009
Depending how big your screen is, if your text will fit on one line you
should be able to so the value of your variable in the Locals screen.

"JoeU2004" wrote:

> When I am at a breakpoint, I can hover the cursor over a variable to see its
> current value. But if the value of a string variable is "too long" (TBA),
> it appears in the box as ``var="blah-blah...``. That is, it is incomplete.
>
> How can I see the entire string value -- and any other values that might be
> "too long" and get truncated?
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This 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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check to see if entire string is UpperCase? msnyc07 Microsoft Excel Programming 6 18th Feb 2010 04:15 AM
String function not working while debugging. archana Microsoft C# .NET 6 7th Feb 2006 08:09 AM
Sum of Len(string) for an entire row durex Microsoft Excel Programming 7 22nd Oct 2005 02:15 AM
debugging an sql format string =?Utf-8?B?cmFtb25yZWQ=?= Microsoft C# .NET 2 29th Dec 2004 09:54 AM
Query string for debugging Lloyd Sheen Microsoft ASP .NET 2 6th Mar 2004 10:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 PM.