Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reading Stack from VB6

3 views
Skip to first unread message

Programmer666

unread,
Feb 26, 2009, 9:31:25 AM2/26/09
to
If you have a problem /bug and you want to check the stack how to do that in
VB6? Can it be done without writing code?

Thanks

Ralph

unread,
Feb 25, 2009, 12:02:48 PM2/25/09
to

"Programmer666" <progra...@nowhere.com> wrote in message
news:go3ko2$ev2$1...@news.motzarella.org...

In the IDE use "Call Stack" contrl-L (Debug Menu)

If in a compiled executable use DebugBreak() and the VC++ debugger
(CodeView) or WinDbg. (or also Dr. Watson or other just-in-time debugger)

http:


Karl E. Peterson

unread,
Feb 25, 2009, 12:14:41 PM2/25/09
to
Programmer666 wrote:
> If you have a problem /bug and you want to check the stack how to do that in
> VB6? Can it be done without writing code?

I'm curious how you got yourself in a situation, with ClassicVB, where this desire
came to be? I've been using it since the get-go, and I've never once thought that'd
help me understand my own code.
--
.NET: It's About Trust!
http://vfred.mvps.org


Ralph

unread,
Feb 25, 2009, 12:08:57 PM2/25/09
to
To clarify, "DebugBreak" is not an internal VB function, you have to declare
a WinAPI call:

Private Declare Sub DebugBreak Lib "kernel32" Alias "DebugBreak" ()

-ralph


Ralph

unread,
Feb 25, 2009, 12:20:17 PM2/25/09
to

"Karl E. Peterson" <ka...@mvps.org> wrote in message
news:uo7vMy2l...@TK2MSFTNGP03.phx.gbl...

> Programmer666 wrote:
> > If you have a problem /bug and you want to check the stack how to do
that in
> > VB6? Can it be done without writing code?
>
> I'm curious how you got yourself in a situation, with ClassicVB, where
this desire
> came to be? I've been using it since the get-go, and I've never once
thought that'd
> help me understand my own code.
> --

lol

This post also struck me as odd, especially since the Call Stack View is a
simple menu click. I suspect the OP is really looking for some kind of
static "call trace".

-ralph


Karl E. Peterson

unread,
Feb 25, 2009, 12:57:33 PM2/25/09
to
Ralph wrote:
> "Karl E. Peterson" <ka...@mvps.org> wrote...

>> Programmer666 wrote:
>> > If you have a problem /bug and you want to check the stack how to do that in
>> > VB6? Can it be done without writing code?
>>
>> I'm curious how you got yourself in a situation, with ClassicVB, where this
>> desire
>> came to be? I've been using it since the get-go, and I've never once thought
>> that'd help me understand my own code.
>
> lol
>
> This post also struck me as odd, especially since the Call Stack View is a
> simple menu click. I suspect the OP is really looking for some kind of
> static "call trace".

I was thinking more in terms of him wanting to look at pushed parameters, and such,
in addition to return addresses. Just seemed so incredibly retro, y'know?

Unknown

unread,
Feb 25, 2009, 9:23:25 PM2/25/09
to
Hi,

"Programmer666" <progra...@nowhere.com> wrote in message
news:go3ko2$ev2$1...@news.motzarella.org...

> If you have a problem /bug and you want to check the stack how to do that
> in VB6? Can it be done without writing code?
>

Not from inside VB6 code as such. You have to attach an external debugger or
use the IDE.

Jason Keats

unread,
Feb 25, 2009, 10:44:23 PM2/25/09
to
Programmer666 wrote:
> If you have a problem /bug and you want to check the stack how to do
> that in VB6? Can it be done without writing code?

I use a combination of the free add-ins HuntERR (no longer readily
available) and MZ-Tools to insert my error handlers and add line numbers.
If, or when, an error occurs I get a stack trace with line numbers - which
then gets emailed to me (if I'm not using the IDE).

So, theoretically, I don't actually write the code - just click a button to
insert a handler (of a few lines) into each sub/function.


0 new messages