|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
determining line numbers upon errorI'm looking for some advice and guidance. I have a program in vb.net and I know that when it's run and the pdb file is available that the exception will contain the line number of the error. Obviously when trying to track down an error this is extremely valuable. I've also heard people say that when you distribute your app, you should compile it without debug and without the pdb file. In this case the exception has no error numbers. My question is 2 part. First why shouldn't you distribute a debug version with a pdb file. If an error occurs while a customer is running your program the exact line number can be written to a log file and it greatly speeds up the time necessary to find and fix the bug. Second, assuming there are good reasons not to distribute a debug version, does anybody know of a technique (other than updating a public variable with an incrementing number every other line of code) that would help to narrow down where an error occurs. I know about the unsupported ERL function but I believe that works only with an ON Error stmt, and I use structured Try Catch blocks throughout the program. Any Ideas? Thanks for any help... > My question is 2 part. First why shouldn't you distribute a debug version Because the customer shouldn't be debugging and fixing your code. Sending > with a pdb file. If an error occurs while a customer is running your > program the exact line number can be written to a log file and it greatly > speeds up the time necessary to find and fix the bug. out an assembly compiled with debug mode turned on generally results in slower executing code as well. > Second, assuming there are good reasons not to distribute a debug version, If you are using Try...Catch statements, create log entries about any > does anybody know of a technique (other than updating a public variable > with an incrementing number every other line of code) that would help to > narrow down where an error occurs. I know about the unsupported ERL > function but I believe that works only with an ON Error stmt, and I use > structured Try Catch blocks throughout the program. exceptions you encounter. The line number is not paramount. Show quoteHide quote > > Any Ideas? Thanks for any help... > Hi John
why shouldn`t you deploy a debug version ?? well the answer is simple performance and you make it easier for someone to reverse engineer your application if you do so . Ideas ?? Make sure your application is tested sufficiently , if you encounter a customer with a problem , just ask them the parameters that let the error occur and test it in your dev environment . regards Michel Posseth [MCP] Show quoteHide quote "JohnR" wrote: > Hi, > I'm looking for some advice and guidance. I have a program in vb.net and I > know that when it's run and the pdb file is available that the exception > will contain the line number of the error. Obviously when trying to track > down an error this is extremely valuable. I've also heard people say that > when you distribute your app, you should compile it without debug and > without the pdb file. In this case the exception has no error numbers. > > My question is 2 part. First why shouldn't you distribute a debug version > with a pdb file. If an error occurs while a customer is running your > program the exact line number can be written to a log file and it greatly > speeds up the time necessary to find and fix the bug. > > Second, assuming there are good reasons not to distribute a debug version, > does anybody know of a technique (other than updating a public variable with > an incrementing number every other line of code) that would help to narrow > down where an error occurs. I know about the unsupported ERL function but > I believe that works only with an ON Error stmt, and I use structured Try > Catch blocks throughout the program. > > Any Ideas? Thanks for any help... > > >
anonymous methods only available in C#?
MessageBox in Validating event cancels subsequent events VB2005 Hiding Windows Forms Setup project in VB.NET ? Drawstring question... ErrorProvider in .Net 2003 Passing parameters best practice How do I send null values to an integer type variable? listView - filling it with datareader Help Needed. Update with parameters error - No value given for one or more parameters. |
|||||||||||||||||||||||