From 3f583916719eeef598d10a5d4e14ef14f008243b Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 11 May 2021 07:36:37 -0700 Subject: Merge Dtf --- .../Dtf/Documents/Guide/Content/debuggingcas.htm | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/samples/Dtf/Documents/Guide/Content/debuggingcas.htm (limited to 'src/samples/Dtf/Documents/Guide/Content/debuggingcas.htm') diff --git a/src/samples/Dtf/Documents/Guide/Content/debuggingcas.htm b/src/samples/Dtf/Documents/Guide/Content/debuggingcas.htm new file mode 100644 index 00000000..ca1be161 --- /dev/null +++ b/src/samples/Dtf/Documents/Guide/Content/debuggingcas.htm @@ -0,0 +1,66 @@ + + + Debugging Managed Custom Actions + + + + + + +
+ Deployment Tools Foundation
+ Debugging Managed Custom Actions
+
+ + Development Guide > + Managed CAs > + Debugging + +
+
+
+ +
+

There are two ways to attach a debugger to a managed custom action.

+

Attach to message-box: Add some temporary code to your custom action to display a + message box. Then when the message box pops up at install time, you can attch your + debugger to that process (usually identifiable by the title of the message box). + Once attached, you can ensure that symbols are loaded if necessary (they will be automatically + loaded if PDB files were embedded in the CA assembly at build time), then set breakpoints + anywhere in the custom action code.

+

MMsiBreak environment variable: When debugging managed custom actions, + you should use the MMsiBreak environment variable instead of MsiBreak. Set the MMsiBreak + variable to the custom action entrypoint name. (Remember this might be different from + the method name if it was overridden by the CustomActionAttribute.) When the CA proxy + finds a matching name, the CLR JIT-debugging dialog + will appear with text similar to "An exception 'Launch for user' has occurred + in YourCustomActionName." The debug break occurs after the custom + action assembly has been loaded, but just before custom action method is invoked. + Once attached, you can ensure that symbols are loaded if necessary, + then set breakpoints anywhere in the custom action code. Note: the MMsiBreak + environment variable can also accept a comma-separated list of action names, any of + which will cause a break when hit.

+


+ +
+ + +
+ + + -- cgit v1.2.3-55-g6feb