[IronPython] Prevention of SystemExit Dialog While Debugging

Jones, Larry Larry.Jones at aspentech.com
Mon Aug 30 16:43:40 PDT 2010


Dino,

 

Thanks for the note.

 

I agree that I do not want to check this usage, but since it is a
prototype designed to help persuade others on the productivity of unit
tests in IronPython, I think it is adequate.

 

Have a great day!

 

From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Monday, August 30, 2010 4:18 PM
To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com
Subject: Re: [IronPython] Prevention of SystemExit Dialog While
Debugging

 

import System

System.Diagnostics.Debugger.IsAttached

 

Will determine if the debugger is attached or not.  

 

Personally I hate code which checks this though but your usage sounds
safe enough J

 

From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Jones, Larry
Sent: Monday, August 30, 2010 2:13 PM
To: users-ironpython.com at lists.ironpython.com
Subject: [IronPython] Prevention of SystemExit Dialog While Debugging

 

I'm writing unit tests in IronPython.

 

The implementation of unittest.main() calls sys.exit() when finished
even if no testing errors occurred. Consequently, the Visual Studio
debugger presents a dialog indicating that the SystemExit exception was
unhandled.  Running from the console, I do not see any evidence of the
SystemExit exception. Because my colleagues are not familiar with
IronPython, seeing this error in the debugger will cause them to think
that some problem occurred on exit.

 

Although I suspect I can configure Visual Studio to ignore this
exception, I'd prefer not to because it may indicate an actual problem.

 

How can I determine if an IronPython script is running under the VS
debugger?

 

Thanks.

 

Have a great day!

 


****************************************************************** 
This e-mail and any attachments are intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail, you are hereby notified any dissemination, distribution or
copying of this email, and any attachments thereto, is strictly
prohibited. If you receive this email in error please immediately notify
the sender and permanently delete the original copy and any copy of any
e-mail, and any printout thereof.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20100830/75be8fb1/attachment-0003.htm>


More information about the Users mailing list