Unattended .NET Program Starts Debugger - How To Stop This?

A

Axel Dahmen

Hi,

we're running an unattended .NET Console program through SQL Server Agent. Whenever this program runs into an exception, the Visual Studio debugger dialog field is launched on our server.

How can we stop the .NET Console program from launching the VS debugger when an exception occurs?

TIA,
Axel Dahmen
 
C

Colbert Zhou [MSFT]

Hello Axel,

Thanks for posting in Microsoft Newsgroup, my name is Colbert Zhou [MSFT]
and I will be working on this issue with you.

The link posted by Jeroen is pretty good and suitable for the issue
described by you and thanks to Jeroen! We can achieve the objective by
changing the DbgJITDebugLaunchSetting and DbgManagedDebugger registry
value. Note that if we are using .NET Framework 2.0 or above, both of them
exist in the HKLM\SOFTWARE\Microsoft\.NETFramework. I think, since our .NET
Console application is unattended, we can to use 1 for the
DbgJITDebugLaunchSetting.

Please read the document
http://msdn.microsoft.com/en-us/library/2ac5yxx6.aspx, for more information
about the DbgJITDebugLaunchSetting value.

Let me know if any future support we can provide from our side. Have a nice
day!


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Axel Dahmen

Thanks, Jeroen and Colbert!

I've forwarded your solution to our IT department and now I'm waiting for their response.

One more question: In the MSDN article you've pointed me to it reads: "This only applies to processes that are interactive with the desktop; services and other noninteractive processes will terminate."

Our Console program is started by SQL Server Agent, so it's non-interactive. However, the debugger selection dialog box is displayed...

How can I set an .NET application to run non-interactive?

TIA,
www.axeldahmen.de
Axel Dahmen







Colbert Zhou said:
Hello Axel,

Thanks for posting in Microsoft Newsgroup, my name is Colbert Zhou [MSFT]
and I will be working on this issue with you.

The link posted by Jeroen is pretty good and suitable for the issue
described by you and thanks to Jeroen! We can achieve the objective by
changing the DbgJITDebugLaunchSetting and DbgManagedDebugger registry
value. Note that if we are using .NET Framework 2.0 or above, both of them
exist in the HKLM\SOFTWARE\Microsoft\.NETFramework. I think, since our ..NET
Console application is unattended, we can to use 1 for the
DbgJITDebugLaunchSetting.

Please read the document
http://msdn.microsoft.com/en-us/library/2ac5yxx6.aspx, for more information
about the DbgJITDebugLaunchSetting value.

Let me know if any future support we can provide from our side. Have a nice
day!


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications..

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Colbert Zhou [MSFT]

Hello Axel,

Good question! Based on my experience, if we want our application to be
non-interactive, we need to develop a Windows Service application, rather
than the Console application. The console application is considered as
interactive process since the user can give input and get output via the
command window. So I do not think we can set a .NET console application to
run non-interactive, although it is unattended logically.

So, we have two choices here, and I think the first option is more
convenience and executable.
1. Using the Console application, and change the DbgJITDebugLaunchSetting
to 1.
2. Leave the DbgJITDebugLaunchSetting as 0, but develop a Windows Services
application instead.

If your IT department gives feedbacks and you need any future assistance on
this issue, please feel free to update the thread and I will try my best to
follow up.

Have a good day, Axel!

Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top