Debugging: how to see entire string var value?

J

JoeU2004

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?
 
R

Rick Rothstein

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
 
J

JoeU2004

Rick Rothstein said:
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 -----
 
R

Rick Rothstein

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.
 
J

JoeU2004

Rick Rothstein said:
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 -----
 
R

Rick Rothstein

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 said:
Rick Rothstein said:
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 said:
Not that I am aware of.
 
N

Normek

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top