问题
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.
回答1:
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.
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/1470314/how-to-debug-isapi-using-visual-studio