[wix-users] Debug custom action in VS2017

Lmloge lmloge at orange.fr
Fri Jan 25 02:19:24 PST 2019


After building a setup file
and while trying to install an application by running this setup file
something wrong is happening while executing a custom action.

To find out what's going wrong, I need to debug the code which is C/C++ 
code in Microsoft Visual Studio 2017.

To do that, I've put a "MessageBox()" function call in the custom action 
MessageBox(NULL, L"*** (Custom action) Please attach a debugger. ***", 
L"(Custom action) Debug", MB_OK);

When I start the installation, the message box pops up.

In Visual Studio 2017, I select the menu "Debug -> Attach to process...".
I select the entry in the "Available processes" list :
Process     | ... | Title                    | Type | User 
name             | Session
msiexec.exe | ... | (Custom action) Debug    | x86  | 
<hostname>\<username> | 9
and click "Attach".
<hostname> is my machine name.
<username> is my system user name.

I get the error message:
"Unable to attach to process. Access is denied."

I have tried to make it work with no success.

Can you advise me what to do to be able to debug my custom action code?

Thank you.
Best regards.

More information about the wix-users mailing list