Search code examples
delphidebuggingiis64-bitdelphi-10.2-tokyo

Attaching Delphi 64 bit debugger to IIS (ISAPI module)


I am running Delphi 10.2.3 on Windows 10 v.1709 and I would like to attach 64 bit debugger to IIS' 64 bit worker process w3wp.exe (I am developing ISAPI module).

Until recently I was using Delphi 2010 only and there I had no problem to debug my ISAPI 32 bit module by attaching to w3wp process when it is loaded by IIS.

When I attach Delphi 10.2.3 to 64 bit w3wp I do not have any debug info and I cannot put breakpoints anywhere. What I have found out is that it must be a problem of path because in Process Monitor I can see these lines:

ReadFile:  C:\BIN\my_PATH\Win64\my_ISAPI.dll
ReadFile:  C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\<UNKNOWN>.rsm
ReadFile:  C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\<UNKNOWN>.dcp

I tried to play with working directories and debug symbols paths under Parameters but nothing helped.

Any idea how to have debug info after attaching to the process?


Solution

  • Thanks to @Brian and his link to Paul Klink's Debugging ISAPI with IIS Express I was able to start debugging in more appropriate way - it's always good to make your working habits better :)

    I should not forget also Scott Hanselman's blog which is also very worth of looking.