[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 593
  • Last Modified:

How to debug a service in VB6

I have a problem in a Windows Service I created: when I call the StartService API function, it appears the typical Windows message saying the application crashed.

So I imagine I have a problem in the code that implements the service, but I don't know how can I debug. I created a log system (writing to a file) but the code inside the service doesn't write anything inside.

Could you show me any ideas to know how to debug this part of code ?

Many thanks.
  • 2
1 Solution
In VB6 under the Project Properties, Debug tab you can say "Wait for ..."
I would try to Run > "Start with Full Compile" putting a break point in the StartService code and then start your service.  Hopefully, VB6 will intercept the request from service manager.
gplanaAuthor Commented:

Sorry, but all controls under the debug tab appears disabled. The first option "Wait component creation" is checked (but disabled also).

I tried to put the breakpoint on the start service code, but it doesn't stops, because he calls another process (well, the same .exe program but with other parameters).
Deepu SreedharBI Software EngineerCommented:
What I am doing for debugging the service is, Copy the source code into a GUI application and Start Service Code will be changed to a button click event. I hope you got what I mean.
gplanaAuthor Commented:
Ok, the problem was I have more than one process and I were debugging the other one.

Thank you for your support.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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