UWP – Debug an app service

Posted · Add Comment

When we work with Cortana in a new UWP app, we have to develop a new app service based on a IBackgroundTask.

To launch the debug, we have to:

  1. Ensure that the entire solution is deployed before debugging because the app service provider app must be deployed before the service can be called. (In Visual Studio, Build > Deploy Solution).
  2. In the Solution Explorer, right-click the UI project and choose Properties. From the Debug tab, change the Start action to Do not launch, but debug my code when it starts.
  3. In the AppService project, in a class file, set a breakpoint in OnRequestReceived().
  4. Set the UI project to be the startup project and press F5.

Enjoy your debug :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>