getting confused and going crazy

  • Thread starter Thread starter Larry Tate
  • Start date Start date
L

Larry Tate

I have had a monstrous time getting any good debugging info out of the .net
platform.

Using ...
..NET Framework 1.1
Windows 2K Server
VB.NET <- is this the problem?
error handling in the global.asax file.

I am seeing articles that say line numbers are in the ..
Server.GetLastError().toString()
or
Server.GetLastError().StackTrace.toString()

So far I have logged this in the event logger, wrote it to a custom text
file, and emailed it to myself. As it stands I can produce no line numbers.
Even though I have found articles with images showing the line numbers in
the output. Mine have none. (this is when I went crazy).

I am getting no relevant information other than there was an error on a
page.

One thing that is odd. I tried to use the stackframe and iterate through it
and call sf.GetFileLineNumber(). The problem is when I do this, if I call
any other stackframe than 0 my code dies. If I call only 0 then I get line
numbers and page info for global.asax.

At this point I am willing to get out my check book and pay. I am on week 2
of this and have read hundreds of articles and am at the end of my rope.
My goal ...
I want to see a line number and if possible what exactly caused the error.
This can be in a class or function or sub.

If anyone can help I will gladly send you money for a solid solution. Keep
in mind I am using VB in all of my code.

Thanks,
Larry
 
Hi Larry,
I may be wrong but I think you only get line numbers when you are in debug
mode. When you do a build in Release mode that information isn't there any
more.


Steve
 
Hmm, sound a little strange. Are you making asp.net or windows form.

Beware of debug and release settings. And in the Debug dropdown make sure
the setting´s in configuration manager is correct (I don't know what the
configuration manager is, but once I had excatly the same problem, and they
were caused by this configuration manager)

Good Luck
 
I think I have that. Is it configured in the web.xml file?

<system.web>
<compilation debug="true" />
<customErrors mode="Off"/>
</system.web>

Do I need to add other parameters?

Thanks,
Larry
 
Back
Top