PowerApps – Debugging your apps in Power Apps

Note: There is now a new way of debugging your power apps. Please read my updated post about debugging Power Apps with Monitor.

One of the major complaints about PowerApps Development that I hear is the difficulties of debugging an app in PowerApps. In this post I’m going through a simple approach for debugging your PowerApps apps.

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps enabledebug

Now I also rename the Screen1 to DebugScreen as I don’t like the default names where controls are simply numbered.

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps screendebug

Then I add a few more labels on my DebugScreen so that my variable values are displayed.

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps debugscreen

Huh, why would I want to do that? Within the PowerApps app I can display my variables.

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps variablesoverview

Yes indeed you can do that, but now I’m going to take things to the next step. What if you want to debug non variable values?

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps somefunction

Or what if you want to debug while you are running the app? Leaving the app and going to the Variables overview is quite a few clicks away.

You can now simply add a debug button to your application that displays all the debug values that you are interested in.

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps debugbutton

This Debug button will navigate to my Debug Screen with the following navigate function

[code lang=text]
Navigate(ScreenDebug,ScreenTransition.Cover)
[/code]

Now we are nearly there. We just need to make the button invisible when the debug variable has been set to false:

PowerApps - Debugging your apps in Power Apps Microsoft Office 365, Microsoft Power Apps visiblebutton

All we need to do is set the visible field to Debug=true or just Debug would work as well of course and now we have our debug buttons available and we can inspect the app without leaving the app.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: