Creating Memory Dump (Advanced Topic)

M

Magius96

I'm writing a debugging module to include in my applications that will output
log files anytime an exception(error) is thrown. What I'd like to do is to
dump the memory into the log file so I can avoid tracking each and every
variable. If it could show me all variables and thier values that would be
perfect. If it could show me the stack as well, that would be a major bonus
too.

I'm asking if there is anyway that I can create a class module to do even
part of this for me. I don't have the luxury of downloading any plugins or
3rd party addons, so whatever solution I use, I have to be able to code it
myself. If someone from this community could simply point me in the right
direction, I'd be gratefull.

Honestly, I'm not even sure it can be done.
 
M

mcescher

I'm writing a debugging module to include in my applications that will output
log files anytime an exception(error) is thrown.  What I'd like to do is to
dump the memory into the log file so I can avoid tracking each and every
variable.  If it could show me all variables and thier values that would be
perfect.  If it could show me the stack as well, that would be a major bonus
too.

I'm asking if there is anyway that I can create a class module to do even
part of this for me.  I don't have the luxury of downloading any plugins or
3rd party addons, so whatever solution I use, I have to be able to code it
myself.  If someone from this community could simply point me in the right
direction, I'd be gratefull.

Honestly, I'm not even sure it can be done.

Well this group is dedicated to the database tool Microsoft Access.
While it is an awesome tool and very powerful, I think that a task
like that would require a dedicated program. My guess would be that
C# would give you the ability to see that information. If you really
are working in MS Access, perhaps the C# program could write a log
file that was then inported to your database and interpreted by VBA.

My $.02, hope it helps,
Chris M.
 
M

Magius96

Honestly, due to the companies security policies all that does is tell me
that it's a fruitless endeavor. You have at least let me know that what I'm
seeking to do can't be done, at least not easily.

I'll never understand companies that hire someone as an applications
developer, then don't give them access to any real development tools, and
block thier access to download or install anything. Thus I'm stuck with MS
Office and it's associated VBA module.
 
T

Tony Toews [MVP]

Magius96 said:
I'm writing a debugging module to include in my applications that will output
log files anytime an exception(error) is thrown.

So if Word, Excel or Access crash then you'd like to see the memory
dumps?

Or if your Access MDE logs an error message you'd like to see each
variable in Access with data in it? AFAIK can't be done.

Here's a tool that has a little bit of what you want. But it's not
free and I would assume it's a DLL of some sort.
http://www.everythingaccess.com/simplyvba-global-error-handler.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
R

RD

I'm writing a debugging module to include in my applications that will output
log files anytime an exception(error) is thrown.  What I'd like to do is to
dump the memory into the log file so I can avoid tracking each and every
variable.  If it could show me all variables and thier values that would be
perfect.  If it could show me the stack as well, that would be a major bonus
too.

I'm asking if there is anyway that I can create a class module to do even
part of this for me.  I don't have the luxury of downloading any plugins or
3rd party addons, so whatever solution I use, I have to be able to code it
myself.  If someone from this community could simply point me in the right
direction, I'd be gratefull.

Honestly, I'm not even sure it can be done.

That's a tall order! I wrote a small version of a logging function
but I only track a couple of the more important variables. Even that
took quite a bit of work. Don't know anything about getting into the
stack.

In the error handler of every procedure I collect the data from the
variables I care about and pass those, along with the error number and
description, to my logging function. The logging function uses Open
FreeFile For Append and dumps that data in there line by line.

The logging function itself is pretty easy ... it's all the up-front
work you have to do in all the error handlers.

Hope this gives you some ideas,
RD
 
D

david

Each and every variable? I only capture the active form. And the
line number. And I put it all into a table.

I don't use lots of global variables and background forms.

(david)
 

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