Process name does not appear in Delphi XE Attach Dialog to process - cannot be debugged

Scenario:

  • Delphi ISAPI DLL written using Delphi XE, 32 bit.

    The ISAPI card runs through IIS 7.5 on the Windows 7 64 machine desktop.

    The dll is working fine.

    Debug ISAPI DLLs in Delphi XE using Run-> Attach to Process:

    Launch the ISAPI DLL and join the wpw3.exe * 32 process in debugger - it can monitor and debug code at startup in the context of ISAPI.

Problem:

  • My hard drive died last week, and I got a new version of Win 7 - the standard corporate image of Win 7 64 Enterprise (not the same as my previous installation of Win 7 64).

    Now, when I go to Run-> Attach to Process, I no longer see wpw3.exe * 32 process by name, although it appears in the task manager by name. Calling the "show system processes" option in the "Attach to Process" dialog box does not help.

    What I see now (that I had never seen before in my old deployment) is a long list of the “common” system process with PID, but there is no description other than “System”.

    One of these processes is my wpw3.exe * 32 process, and I determined its PID using MS Process Explorer. But if I try to attach to this process I get an error message - “Unable to create process - access denied '- so I can’t debug. (Error message' Error 'Opening process, Access denied' is also displayed in Process Explorer for certain properties , although the descriptive name of the process is "Here you can see wpw3.exe * 32 'associated with the PID.)

    How can I get the Run-> Attach to process dialog box to display the proper process name wpw3.exe * 32 and attach to it so that I can debug it?

    Is this a Delphi problem? IIS problem? ISAPI issue? This is one of the problems - the lack of a description of the descriptive process and the inability to bind to the process are caused by the same problem; or are these two problems: one is the lack of a descriptive name, the other is the inability to attach to the process?

    (I don’t want to use - I can’t really use it - the webApp debugger for this is an ISAPI dll that is deployed for production just like they are written and debugged in IIS - I need to see that they work in the IIS context.)

  • Debugging the ISAPI dll for several years in this way, with different versions of Delphi and in different operating systems and servers without problems - I have never encountered this problem before. I'm at a dead end.

+4
source share
2 answers

My account has administrator rights, but I can try to run DelphiXE as an administrator - run it with the option "run as administrator".

I was asked "you want to allow ..." - clicked "yes", and "Delphi" ran. Configure my process, connect and trace through my process code names that are now visible, and I can connect to my IIS process and debug in Delphi Debugger.

I did not have to go through this step in my previous deployment for any reason, but the problem has been resolved.

+5
source

If you want to debug the 32-bit ISAPI version of a 64-bit OS, you can use the following process.

It is assumed that you have taken other steps to enable the 32-bit ISAPI libraries.

  • Stop IIS

    net stop w3svc

  • Run 32-bit workflow in debug mode

    % SYSTEMROOT% \ SysWOW64 \ inetsrv \ w3wp -debug

  • Join w3wp in the debugger. As you noticed, you need to run Delphi with elevated privileges for this.

0
source

Source: https://habr.com/ru/post/1434093/


All Articles