Problem debugging a windows service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Greg

    #1

    Problem debugging a windows service

    I am having a problem trying to debug my windows service. The service
    itself is working fine (it starts a timer, which writes a log entry
    every 20 seconds). However, when I set my breakpoint on the line that
    writes the log entry, the code never breaks - it just keeps writing
    the log entries. I tried to attach my service to the running process
    via Debug | Attach to Process (in VS 2005), but in the list of
    Available Processes, my process is grayed out, and the Attach button
    is disabled. Any idea what is preventing me from attaching to the
    running process?

  • Phill W.

    #2
    Re: Problem debugging a windows service

    Greg wrote:
    I am having a problem trying to debug my windows service.
    I tried to attach my service to the running process
    via Debug | Attach to Process (in VS 2005), but in the list of
    Available Processes, my process is grayed out, and the Attach button
    is disabled.
    Is the service built in Debug Mode and installed /configured to run
    under /your/ user account?

    HTH,
    Phill W.

    Comment

    • Greg

      #3
      Re: Problem debugging a windows service

      On Feb 22, 4:42 am, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k>
      wrote:
      Greg wrote:
      I am having a problem trying to debug my windows service.
      I tried to attach my service to the running process
      via Debug | Attach to Process (in VS 2005), but in the list of
      Available Processes, my process is grayed out, and the Attach button
      is disabled.
      >
      Is the service built in Debug Mode and installed /configured to run
      under /your/ user account?
      >
      HTH,
      Phill W.
      It is built in debug mode. I get the same results whether it is run
      under my user account or as a local system account. I'm hoping it's
      something stupid I'm forgetting, but nothing is jumping out at me yet.

      Comment

      • Greg

        #4
        Re: Problem debugging a windows service

        On Feb 22, 4:42 am, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k>
        wrote:
        Greg wrote:
        I am having a problem trying to debug my windows service.
        I tried to attach my service to the running process
        via Debug | Attach to Process (in VS 2005), but in the list of
        Available Processes, my process is grayed out, and the Attach button
        is disabled.
        >
        Is the service built in Debug Mode and installed /configured to run
        under /your/ user account?
        >
        HTH,
        Phill W.
        It is built in debug mode. I get the same results whether it is run
        under my user account or as a local system account. I'm hoping it's
        something stupid I'm forgetting, but nothing is jumping out at me yet.

        Comment

        Working...