Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 613
  • Last Modified:

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

I am trying to attach my vb.net 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 vb.net 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.
ScreenShot098.jpg
ScreenShot095.jpg
0
Bran-Damage
Asked:
Bran-Damage
  • 2
  • 2
1 Solution
 
Arthur_WoodCommented:
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.
0
 
Bran-DamageAuthor Commented:
Yes, the DLL that gets built when building the class, is used in my service.
0
 
Arthur_WoodCommented:
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.
 
AW
0
 
Bran-DamageAuthor Commented:
I figured out the answer to this question.  When trying to attach the vb.net class to the windows service, i was getting the original message.  I think decided to add the vb.net class into the code for the windows service that I created, and then attached the code to the service and had no problems.  
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now