How do I attach CLASS module to a service running on my computer.

Posted on 2009-02-10
Last Modified: 2012-05-06
I am trying to attach my class module to a service that is running on my pc.  The service was compiled in debug mode and installed.  Then I open up the class module, and then attach the to the process.  Then my breakpoints give me this message: "The Breakpoint will not currently be hit.  No symbols have been loaded for this document"

I have read over many forums and have seen that this is usually solved by simply change the compile mode to debug for the class module.  Now, for some reason I have no options to change my compile mode.  Please see print screens.
Question by:Bran-Damage
    LVL 44

    Expert Comment

    Is the C# class part of the code for the Service?  That is the only way that you can attach to an external 'program'.  You cannot simply attach Visual Studio code to a random external application.  The whole point of attaching is so that you can monitor your code as it is executed by the external code, by setting break points in your code.

    You should be able to Build (or Rebuild All) your code, and that will create the dll in 'debug' mode.

    Author Comment

    Yes, the DLL that gets built when building the class, is used in my service.
    LVL 44

    Expert Comment

    I have never tried to debug a running service, by stepping into the Service code, so I can't offer much assistance on that point.

    Accepted Solution

    I figured out the answer to this question.  When trying to attach the class to the windows service, i was getting the original message.  I think decided to add the class into the code for the windows service that I created, and then attached the code to the service and had no problems.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now