Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / February 2007

Tip: Looking for answers? Try searching our database.

Disabling "Just my code" changes Debug|Exceptions dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Altman - 01 Feb 2007 00:28 GMT
Normally, the dialog box displayed by Debug|Exceptions has 3 columns:  Name,
Thrown, and User-unhandled.  However, in my VB.Net project (Visual Studio
2005 SP1), if I disable "Just My Code" (under
Tools|Options|Debugging|General), then the Debug|Exceptions dialog no longer
shows the "User unhandled" column.

Can anyone suggest a reason why this might be happening?
WenYuan Wang - 01 Feb 2007 12:26 GMT
Hi Bob,
Thanks for your post.

I have reproduced this issue. The User-unhandled column will only appear in
Exception dialog when we enable "Just My Code" option in
Tools|Options|Debugging|General.

As far as I know, "user-unhandled" column is used for determining which
user-unhandled exceptions you want to break on.

If you disable the "Just My Code" option, all exceptions will be handled.
For this reason, we need not to determine which exception we want to handle.

Please feel free to reply me if you have any further issue. I'm glad to
work with you.
Best regards,
Wen Yuan
Bob Altman - 01 Feb 2007 22:24 GMT
Hi Wen Yuan,

I don't get it.  As I understand it, enabling "Just My Code" prevents me
from stepping into code that meets any of several criteria (optimized, no
symbols, etc.).  It also prevents the debuger from breaking in code that
meets the "not my code" criteria if I click on the "break" button.  What's
the connection between that behavior and whether or not I want the debugger
to break when a particular exception is unhandled?

> Hi Bob,
> Thanks for your post.
[quoted text clipped - 15 lines]
> Best regards,
> Wen Yuan
WenYuan Wang - 02 Feb 2007 11:19 GMT
Hi Bob,
Thanks for your reply.

If an exception is thrown and isn't handled in user code then this will
cause a break. So debugger will break in the following cases, if you
disable user-unhandled then no break happens.

Non-user frame1 <--- exception thrown here
User frame1
User frame2
Non-user frame2 <-- exception caught here

User frame1       <-- exception thrown here
Non-user frame1
Non-user frame2 <-- exception caught here
User frame2
Non-user frame3

User code - have symbols + is unoptiomized + no non-user attributes

The idea is that user may want to write a handler for the exception in
these cases to provide a better error message and continue for instance
instead of letting the exception be handled by a generic handler.

Please feel free to reply me if you have anything unclear and we will
follow up.
Have a great day.
Best regards,
Wen Yuan
Bob Altman - 04 Feb 2007 18:04 GMT
Thanks Wen Yuan!  It finally occurred to me to press F1 while I was staring
at the Debug|Exceptions dialog.  That took me to an MSDN Help page that
cleared up my (bone headed) confusion.  I was missing the basic concept that
the user-unhandled column is equivalent to "Unhandled in "My Code" (as in
"Just My Code").  So obviously, turning off "Just My Code" turns off that
column.

I would imagine that I'm far from the only user who has seen this dialog and
not understood what that column really does.  The dialog really should be
redesigned to say "Unhandled by My Code" (IMHO).

> Hi Bob,
> Thanks for your reply.
[quoted text clipped - 25 lines]
> Best regards,
> Wen Yuan
WenYuan Wang - 05 Feb 2007 11:08 GMT
Hi Bob,

Thanks for your reply. The name of column ("user-unhandled") is really
confusable. But I'm very glad to hear you have understand it. Please feel
free to reply me if you have any further question. I'm glad to work with
you.

Have a great day.
Best regards,
Wen Yuan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.