DEV Community

Rogier van der Hee
Rogier van der Hee

Posted on

Use browser dev tools with Blazor Hybrid

As the exciting journey begins into creating hybrid mobile apps with MAUI Blazor, we start including our shiny Blazor components into native apps. But how can you use the Browser dev tools?

First, create a new app using the MAUI Blazor App Preview template:
Image description

Now add these lines in your MauiProgram.cs:

#if DEBUG
        builder.Services.AddBlazorWebViewDeveloperTools();
#endif
Enter fullscreen mode Exit fullscreen mode

Next, launch app in the Android emulator:
Image description

OK, now the app is running, now start a Desktop Edge browser and enter edge://inspect/#devices as url:
Image description

After a few seconds a Remove target appears with your app name in it:
Image description

Finally, click inspect to launch the Dev tools for your instance and now you can use all your existing tools like inspect, layout etc!

Image description

Top comments (0)