1.  Start VC++, open your service project.
2.  Add a "copy" command to copy your service to wherever you run it from to the project settings Post Build Steps.
3.  Start another copy of VC++ (I'll name it VC2).  Don't have any project or workspace loaded.
4.  Open control panel | services.
5.  Start the service.
6.  Go to VC2, Build menu, Debug, Attach, Show System processes, find your service in the list and select it.
7.  File | Open, go to the directory with your service source files and select all the *.h and *.cpp files that you think you'll debug (at least the main extension *.cpp).
8.  Set your debug break points.
9.  Debug to your heart's content.

To edit your code, go to control panel | services again, stop the service.  Go to VC1 for code changes and a re-comp, then start the service again, build/debug/attach/show system... all over again.  It seems a little lengthy at first, but once you do it a couple of times you get used to it.

After you are finished working, save the VC2 workspace (it will prompt you when it exits with F4).  That way when you open VC2 again later you can just open that workspace in the recent list and it will have all the files and debug breaks, etc...

If you have trouble attaching to the service, make sure you have "Act as part of the operating system" enabled for your logon.  To check it, start User Manager.  Policies | User Rights.  Select "Show Advanced User Rights" and go to the right "Act as part of the operating system" and add yourself to the list if you're not there.

on the start/stop of IIS you can create a batch file that uses 'net start' style commands and put a link in your quick launch to quickly start and stop instead of fooling with the services panel.

 

 

----- Original Message -----
From: Neil
Sent: Monday, November 28, 2005 5:33 PM
Subject: [msvc] debugging ISAPI

Hi,
  Does anyone give me a bit advice on how to debug an ISAPI DLL? I am using VC 6.0++ with IIS.
 
Neil
 
 


_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to