How to debug a desktop extension component in a UWP Package.

Allanjb 246 Reputation points
2021-07-28T15:32:27.39+00:00

I have been working through the examples illustrated in Stefan Wick's blog on UWP with Desktop Extensions.
See: uwp-with-desktop-extension-part-1 to uwp-with-desktop-extension-part-3

While I can build the examples in VS2019 and debug the UWP project, (uwp.exe) I cannot debug the FullTrust app which is run as service, (FullTrust.exe) This is the case for all 3 of the examples illustrated in the article. The example that most closely fits my needs is illustrated in the 3rd of Stefan's examples.

I cloned the projects from Github: UWP-FullTrust
Reading all the documentation on debugging packaged apps it should be straight forward but I can't figure it out. FullTrust.exe does not show as a module in the debugger.

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-07-29T06:39:40.017+00:00

    Hello,

    Welcome to Microsoft Q&A!

    In order to debug the fulltrust process in your UWP project, you will have to start the UWP process without debugging (or detach the debugger from it). Then attach to the debugger to the fulltrust process and your breakpoints will be hit.

    First, please deploy your app to your device. Then run your app from the Start Menu. Please remember to start the desktop bridge app instead of a single UWP app or a single WPF app. After, go back to Visual Studio, find the Debug button on the top bar. Click the Debug and choose Attach to Process. It will show a window and you could choose the WPF process. Then you could debug the WPF app as usual.

    Thank you.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.