It is possible to debug IIS and Shibd remotely. The following works for the specific pairing of VS2015, Server 2016 and IIS 10.0.14393.0. Other variants are likely to work with suitable amendment
Chose the project which you wish to debug (probabaly isapi_shib or iis7_shib and (for ease) mark it as the startup project. That way when this is all done hitting F5 will compile, deploy and run the executable.
Set up deployment the Configuration Manager (Build->Configuration Manager). Select the appropriate configuation and platform and tick the "deploy" box for the appropriate project.
Set up the debung but right clicking on the project, selecting properties and then the Debugging menu (again for the appropriate configuation and platform),
Make the following settings:
Debugger to Launch | Remote Windows Debugger |
Remote Command | C:\Windows\System32\inetsrv\w3wp.exe |
Remote Command Arguments | -debug |
Working Directory | c:\opt\shibboleth-sp\.... |
Remote Server name | whatever.example.org:4020 (gotta have the port) |
Debugger Type | default (auto) or "Native Only" |
Deployment Directory | Probably C:\opt\shibboleth-sp\lib64\shibboleth\debug |
Set an appropriate break point. When you try to run the project for the first time there will be a login dialogue (login with an admin user) then the Remote Debugger tool will show you to be logged in. Finally a command window will pop up as IIS starts.
These are the settings I use
Debugger to Launch | Remote Windows Debugger |
Remote Command | C:\opt\shibboleth-sp\sbin64\debug\shibd.exe |
Remote Command Arguments | -console |
Remote Server name | whatever.example.org:4020 (gotta have the port) |
Connection | default (auto) or "Native Only" |
Deployment Directory | C:\opt\shibboleth-sp\sbin64\debug |