Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Try ... Catch ... there is NO way to determine the line of code that triggered the error?

$
0
0

This is something that I've never been able to resolve in any version of Visual Studio (Ultimate 2012 currently).  I'm using VB.NET but the Try ... Catch exception handling does NOT provide any information on exactly what line of code triggered the error when I'm in a debug session.  It'll tell me what the exception issue, but NOTHING about what line actually triggered the exception.

If I have several 100's of lines of code in a Try ... Catch, this becomes a huge issue ... in most cases I stop execution and but a break point at the first line of code in the Try ... Catch and re-run my debug session (definitely NOT efficient).  I have to look for hints based on inspecting all the variables/structures.  This is TIME consuming and not helping the speed of my development work.

Many years ago it was easy to get to the offending line of code ... before the invention of .NET and Try ... Catch, but now I seem to have lost that ability, such a basic and fundamental ability.  I've gone on for years just dealing with the lack of functionality in VS 2008+ series.  

I hoping I'm wrong and there is a way that I just never discovered all these years, if so, can someone please tell me how?

I've seen lots of silly suggestions such as put a Try ... catch on every line of code, but that's not productive.

So have I really lost a fundamental debugging feature?  If so, how is this progress?

Rob

 


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>