Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7587895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:47:21+00:00 2026-05-30T19:47:21+00:00

So I setup a System.Timers.Timer and have a handler for the Elapsed event. It

  • 0

So I setup a System.Timers.Timer and have a handler for the Elapsed event. It works as expected.

However, if I want to debug the code that is called within the elapsed handler; the timer will continue generating additional events. Thus, I can’t single step through the code because timer events stack up on top of each other.

The current workaround is to call Stop on the timer upon entering the handler and Start when leaving. However, that is not how the system is supposed to work so that is a temporary fix. I was wondering if there is a way to configure the debugger to halt the timer while debugging.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:47:22+00:00Added an answer on May 30, 2026 at 7:47 pm

    If you want you can wrap this into a #if DEBUG directive
    or you can use System.Diagnostics.Debugger.IsAttached.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a ftp system setup to monitor/download from remote ftp servers that are
I've inherited some code on a system that I didn't setup, and I'm running
I need to setup a simple IVR system for a friend's company that will
I want to setup a cron job to rsync a remote system to a
I have been asked to setup a course leaflet system for a college. For
I'm working on a survey system for my company and I have it setup
So I have a program that has a list of timers. Each of the
I have few stacks in my code that I use to keep track of
I need to setup a system where customers can choose to Request a Quote
I am running into trouble given the following setup: Operating System is Windows 7

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.