0

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?

Petr Nehez
  • 143
  • 6
  • 1
    Might want to take a look at using IIS Express with the help of these instructions: [Debugging ISAPI with IIS Express](http://paul.klink.id.au/Software/Delphi/DebuggingIsapiWithIisExpress/) – Brian Aug 31 '18 at 12:48
  • OK, I'll try to replace IIS with IIS Express. Thanks – Petr Nehez Aug 31 '18 at 13:05
  • Debugging with IIS Express (8 and 10 have 64 bit version) is recommended. But did you check whether debug symbols were generated properly in your case above? The debugger can only work if `w3wp.exe` loads the symbols. – Lex Li Aug 31 '18 at 13:33
  • And how do you trigger that `w3wp` would load the symbols? If you mean debug symbols = .RSM file then yes, this file is generated correctly. – Petr Nehez Sep 01 '18 at 11:32
  • see here (https://stackoverflow.com/questions/4419086) – Freddie Bell Sep 01 '18 at 17:25

1 Answers1

1

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.

Petr Nehez
  • 143
  • 6