The Shibboleth V2 IdP and SP software have reached End of Life and are no longer supported. This documentation is available for historical purposes only. See the IDP v4 and SP v3 wiki spaces for current documentation on the supported versions.

RemoteDebugWindows


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

Preparing the Server Machine

  • Ensure that IIS is running
  • Ensure that Shibboleth is installed
  • Download and install the appropriate Remote Debugging tools
  • You need to start the Remote Debugger Tool (as admin) everytime you log/reboot the system.  It defaults to using port 4020.
  • If will use the debug build ensure that the debug directories are on the system PATH
  • Stop IIS (from the console).

Setup The Visal Studio Project


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 LaunchRemote Windows Debugger
Remote CommandC:\Windows\System32\inetsrv\w3wp.exe
Remote Command Arguments-debug
Working Directoryc:\opt\shibboleth-sp\....
Remote Server namewhatever.example.org:4020 (gotta have the port)
Debugger Typedefault (auto) or "Native Only"
Deployment DirectoryProbably 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.

Remote shibd

These are the settings I use

Debugger to LaunchRemote Windows Debugger
Remote CommandC:\opt\shibboleth-sp\sbin64\debug\shibd.exe
Remote Command Arguments-console
Remote Server namewhatever.example.org:4020 (gotta have the port)
Connectiondefault (auto) or "Native Only"
Deployment DirectoryC:\opt\shibboleth-sp\sbin64\debug