473,387 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

debugging classes

Hi Gurus

I noticed that when you have a class module without error handling, you can
not actually debug it. That is to say, you will get an error when calling
the class, but it does not tell you where the error takes place. This is
especially difficult if you have several stacks within the class itself.

Here is what I do

1. create new instance of class
2. "let" some values in class
3. call a procedure in the class (open report)
4. this public sub, open report, calls several functions in the class itself
(private functions).

I get an error at 3, but I can not work out exactly where at 4 the error
occurs. Is there a way to work this out?
Nov 13 '05 #1
4 2372
When debugging, in the VB Editor, go to Tools -> Options, and somewhere in
there, you'll find 3 error handling options. The default option is to break
on unhandled errors, but there are 2 other options, Break in Class Module, and
Break on All Errors. If you select either of those other 2 options, the code
will stop on the line that has your error and ignore the active error handling
in the calling code. Remember to set that back to the default later.
On Mon, 21 Jun 2004 17:44:12 +1200, "WindAndWaves" <ac****@ngaru.com> wrote:
Hi Gurus

I noticed that when you have a class module without error handling, you can
not actually debug it. That is to say, you will get an error when calling
the class, but it does not tell you where the error takes place. This is
especially difficult if you have several stacks within the class itself.

Here is what I do

1. create new instance of class
2. "let" some values in class
3. call a procedure in the class (open report)
4. this public sub, open report, calls several functions in the class itself
(private functions).

I get an error at 3, but I can not work out exactly where at 4 the error
occurs. Is there a way to work this out?


Nov 13 '05 #2
WindAndWaves wrote:
Hi Gurus

I noticed that when you have a class module without error handling, you can
not actually debug it. That is to say, you will get an error when calling
the class, but it does not tell you where the error takes place. This is
especially difficult if you have several stacks within the class itself.

Here is what I do

1. create new instance of class
2. "let" some values in class
3. call a procedure in the class (open report)
4. this public sub, open report, calls several functions in the class itself
(private functions).

I get an error at 3, but I can not work out exactly where at 4 the error
occurs. Is there a way to work this out?

A Guess (since I use error trapping, never ran into this problem)
From code window, Tools->Options->General->Break in Class Module.

But you should error trap the code anyway.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 13 '05 #3

You can change the options for error handling to Break in Class module but
you should be error trapping in the class module anyway. If you want the
error to propagate to the calling code then you should do this explicitly
using err.raise.
--
Terry Kreft
MVP Microsoft Access
"WindAndWaves" <ac****@ngaru.com> wrote in message
news:KB******************@news.xtra.co.nz...
Hi Gurus

I noticed that when you have a class module without error handling, you can not actually debug it. That is to say, you will get an error when calling
the class, but it does not tell you where the error takes place. This is
especially difficult if you have several stacks within the class itself.

Here is what I do

1. create new instance of class
2. "let" some values in class
3. call a procedure in the class (open report)
4. this public sub, open report, calls several functions in the class itself (private functions).

I get an error at 3, but I can not work out exactly where at 4 the error
occurs. Is there a way to work this out?

Nov 13 '05 #4
thank you all!
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim Moon | last post by:
I'm setting up a Win Server 2003 for remote debugging. From this page, I see that I need to set two registry keys on the server:...
2
by: Alex Traud | last post by:
hello ng, is there a possibility to debug a template class? i have a template class Polyom<T> (which implements a polynomial) defined in the file polynom.h. thanks in advance alex
5
by: Craig | last post by:
I started this week recomipling all our projects under vc++7 which is ok by me. most of it worked fine and what the compiler spat out was quickly fixed without too much bother. Then came a...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
6
by: Brian Bischof | last post by:
I'm having troubles getting the debugging process to work consistenly for external classes. I got it to work once and then I turned it off. But now I can't get re-enabled. Here is what I'm doing....
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
3
by: Rick | last post by:
We have a web site that was built as an ASP.Net Web Site, I am unable to remote debug, when build ing the web site there is not a dll or PDB file generated. I can debug on my local machine but...
2
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.