|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
error line numberHi,
I am trying to write some error handling code to log the error. But getting the line number of the error is not simple. Is it because the app is set to "Release" and does not have debug info. Is there a way of getting the line number when in release mode????? Thanks "Rotsey" <malcolm_sm***@RemoveThis.optusnet.com.au> schrieb: I don't know of a way. However, you could manually insert line numbers for > I am trying to write some error handling code to log the error. > But getting the line number of the error is not simple. > > Is it because the app is set to "Release" and does not have debug info. > > Is there a way of getting the line number when in release mode????? debugging purposes: <URL:http://dotnet.mvps.org/dotnet/code/techniques/#LineNumberMethodName> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> This works under 2003, I haven't loaded 2005 yet.
Menu Project -> Properties Set Configuration to Release Conifiguration Properties -> Build Check "Generate Debugging Information" You will need to include the generated ".pdb" file with your application. I haven't noticed any speed decrease. Your error handler code can include ex.stacktrace in a message box, which is fantastic for finding an offending line of code, and how it got there. Shane Supposedly the Release configuration should not generate a .pdb file since
at that point the app should have been tested (using the Debug configuration). If you want line numbers at Release configuration without the .pdb file you have to add them to the code and use the Erl function (like in VB6). My add-in has a feature to add line numbers to the code. -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "Rotsey" <malcolm_sm***@RemoveThis.optusnet.com.au> escribió en el mensaje news:u1QL1nxVGHA.5064@TK2MSFTNGP10.phx.gbl... > Hi, > > I am trying to write some error handling code to log the error. > But getting the line number of the error is not simple. > > Is it because the app is set to "Release" and does not have debug info. > > Is there a way of getting the line number when in release mode????? > > Thanks >
Trying to "display" control characters in a text box
Unique Machine Identifier Have you upgraded to VS 2005? MDI Child Windows Overlapped by control on Parent keep program running Foreign Language Names Joining files closing a form for mobile application Com interfaces build in DotNet? Suggest a vb.net online tutorial |
|||||||||||||||||||||||