C # Development Artifice: Debugging Windows System Services

Source: Internet
Author: User
Original: C # Development Artifice: Debugging Windows System Services

Windows system services cannot be run directly and can only be started, paused, resumed, and stopped after the service has been installed, causing debugging of the service not to use normal breakpoint debugging.

To debug a system service, you can attach to a process by finding the "debug" option in the VS toolbar and choosing "Attach to Process"

Then select the appropriate service attach, and then start the service to debug (provided that you have broken down in the code of the service).

However, the above method can not debug the OnStart method, that is, the start of the service can not be debugged to, this time, you need to add debugger.launch () in the OnStart method. Here is an introduction: http://www.cnblogs.com/xzwplus/ Archive/2009/07/06/1129452.html

C # Development Artifice: Debugging Windows System Services

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.