Ricky
Ricky

Reputation: 35953

How to debug ISAPI using Visual Studio

as title, my friend's environment is Windows 2003 server. He attached the IIS process and set the breaking points at codes supposed to run, but VS doesn't stop at all. The ISAPI is written with VC++.

Is there any setting he need to set up?

Thanks.

Upvotes: 4

Views: 3273

Answers (3)

dpiskyulev
dpiskyulev

Reputation: 336

This is kind of late, but there is an easier way.

  • Right click your (ISAPI) project, select Properties
  • In the dialog select Configuration Properties->Debug
  • Enter:
    • Command : C:\Windows\System32\inetsrv\w3wp.exe
    • Command Arguments : -debug
  • Now do "Start Debugging(F5)" for you project.

Visual Studio will launch a test instance of IIS and you can debug your DLL, no need to attach to process, etc.

Make sure to stop IIS service beforehand.

Upvotes: 5

theycallmemorty
theycallmemorty

Reputation: 12962

If your friend is debugging a site on his localhost, AnthonyWJones' advice should suffice.

If its a different machine he may need to run the Visual Studio Remote Debugger and give himself permission to attach to the process.

You can use a tool like Process Explorer to help you figure out which process has your extension/filter loaded so you can attach to the right one.

Upvotes: 1

AnthonyWJones
AnthonyWJones

Reputation: 189525

Visual studio can debug various types of Code: Native, Script, Managed, Silverlight etc. You need to ensure that when you attach that the Attach To: box contains "Native code".

You also need to be sure you are attaching to the correct instance of w3wp.exe if there is more than one.

Upvotes: 3

Related Questions