Solved

debugging an application for deployment, advice?

Posted on 2004-03-22
6
181 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now