Website Building » Wix » How Do I Debug a WiX Project in Visual Studio?

How Do I Debug a WiX Project in Visual Studio?

Last updated on October 1, 2022 @ 1:38 am

Debugging a WiX project in Visual Studio can be a bit tricky, but with a few tips it can be much easier. Here are some tips on how to debug a WiX project in Visual Studio:

First, make sure that you have set breakpoints in your code where you want to break into the debugger. You can do this by clicking on the line of code you want to break on and press F9. This will toggle the breakpoint on and off.

GREAT NEWS:

Exciting update! We've collaborated with Wix to offer WBI users with a free plan for all website creation needs - Explore the details here.

PRO TIP: If you are using Visual Studio to debug a WiX project, be aware that there are some potential issues that can occur. First, make sure that the Visual Studio debugger is properly configured to work with WiX. In the Visual Studio options dialog, go to the Debugging section and ensure that the “Enable native code debugging” option is checked. Next, go to the Advanced section and ensure that “Suppress JIT optimization on module load (Managed only)” is checked. Finally, make sure that you have set a breakpoint in your WiX code before starting the debugger. Otherwise, Visual Studio will not stop at your breakpoint and you will not be able to debug your WiX project.

Next, go to the Debug menu and select Attach to Process. In the Attach to Process dialog, select devenv.exe from the list of processes. This will attach the Visual Studio debugger to your WiX project.

Now that the debugger is attached, press F5 to start debugging. This will cause Visual Studio to break at your breakpoints and allow you to step through your code line by line.

Conclusion:

Debugging a WiX project in Visual Studio can be tricky, but with a few tips it can be much easier. By setting breakpoints and attaching the Visual Studio debugger to your WiX project, you can easily step through your code and find bugs.

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.