How to debug Desktop Bridge Apps

ImportantThe following article uses the free Advanced Installer Visual Studio 2017 Extension,as well as the Professional edition of Advanced Installer, required for building an UWP package.

This tutorial will show you how to debug your desktop application inside an AppX container, using the Advanced Installer extension for Visual Studio 2017 (2015 is supported also).

1. Build your AppX package within Visual Studio

There are two scenarios for creating an UWP AppX build from your Visual Studio solution:

  • Have an Advanced Installer Project in Visual Studio, and configure it to build an AppX package, besides the existing MSI/EXE output
  • Import an existing AppX package with the Advanced Desktop Bridge Project

In both cases you will have a new Advanced Installer Project in your Visual Studio solution, which requires to be configured as follows.

2. Add the Project Output

In your new project, go to Files and Folders, and click Add Project Output, if you have not already. Here you will need to link your project’s PrimaryOutput and References to the newly created UWP project

3. Enable debugging

Right click on your newly created project, and select Properties. From here you will have to go to the Debug section, and activate Enable UWP Debug.

Make sure that your configuration is set to BuildUwpAppX.

To start debugging your application, go to solution explorer in Visual Studio, right click on your UWP AppX build, and set it as as the StartUp project. Press the Start button to begin.

4. Video tutorial

Debug your desktop application inside an AppX container