Solved

debugging an application for deployment, advice?

Posted on 2004-03-22
6
185 Views
Last Modified: 2013-11-22
I'm about to deploy my first VB application to a customer... I need some advice.

I am attempting to do extensive beta-testing before I deploy the application and would like to know how I should perform this from others who have done it.

First, I placed in each function/subroutine:

function doSomething
  on error goto doSomethingError

  'whatever I put in the function
  exit function
doSomethingError:
  Msgbox "Error found at doSomething " & err.Description
end function

is this the best way to catch errors during the testing phase and during the release?

Also I will have a few other individuals testing the application on different computers since I know that being the developer I probably am used to running it a particular way and they can find things I won't think of. What else can I do to make sure the deployment is successful? Is there anything else in VB I should implement that will be very good to have before or during deployment? Please let me know. I have completed a java application before that worked great on release but I'm still kind of new with VB stuff so in a sense you can consider me a beginner on deployment in VB. ;-) thanks for any advice

guid
0
Comment
Question by:guidway
6 Comments
 
LVL 1

Accepted Solution

by:
1markmc earned 150 total points
ID: 10650005
Create an error log and have the testers send this log to you periodically.  Code your application to writing to the error log to include the module name as below:

WriteToLog Err.Number, Me.Name & ".GetTestResults " & Err.Source, Err.Description

0
 
LVL 12

Author Comment

by:guidway
ID: 10650386
one more question (I'll raise the points since this is an add-on question). Should I use the native VB errors in the subs/functions or raise my own using Err.Raise ?

just curious which is better... thanks

guid
0
 
LVL 12

Author Comment

by:guidway
ID: 10650403
I'll give time for anyone else to comment with ideas and close this tomorrow morning... thanks to any who respond. I appreciate it!

guid
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Assisted Solution

by:rettiseert
rettiseert earned 150 total points
ID: 10650717
Hi

You can use Erl to get the number of the line where the error was generated (you'll have to put a number to every line where an error can happen)

Function doSomething()
   On Error Goto doSomethingError
   10   a = 1
   20   a = a / 0     'Division by 0, an error is generated here
   30   a = 2
   Exit Function

doSomethingError:
   MsgBox "Error found at doSomething at line" & Str(Erl) & vbCrLf & "Error number:" & Str(Err.Number)

End Function
0
 
LVL 1

Assisted Solution

by:MADisonMAN
MADisonMAN earned 150 total points
ID: 10653324
Additionally you can generate email to specific tech/group at the end depending how critical the error is. And u can also add the followings to the log file:

date/time stamp
user/domain info
machine/os info
module info where Err occurs
some test results
Err.Number and Err.Description
0
 
LVL 12

Author Comment

by:guidway
ID: 10663298
thanks everyone, I've integrated almost every idea in the application. :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question