Home

Awesome

<p align="center"> <img src="https://github.com/JaneySprings/DotNet.Meteor/raw/main/assets/header.jpg" width="1180px" alt=".NET Meteor" /> <a href="https://dev.to/nromanov/boost-net-maui-development-productivity-6-powerful-features-of-net-meteor-for-vs-code-in-windows-mac-linux-d0b">Features</a> | <a href="https://github.com/JaneySprings/DotNet.Meteor/wiki">Documentation</a> | <a href="https://github.com/JaneySprings/DotNet.Meteor/issues">Support</a>

Overview

 The .NET Meteor allows you to build, debug .NET apps and deploy them to devices or emulators.


Run the Application

  1. Open the project folder.
  2. Open the Run and Debug VSCode tab and click the create a launch.json file.
  3. In the opened panel, select the .NET Meteor Debugger.
  4. In the status bar, select a project (if your opened folder contains several projects) and a configuration (the debug is the default).
  5. In the status bar, click the device name and select a target device/emulator from the opened panel.
  6. Press F5 to debug the application or ctrl + F5 to launch the application without debugging.
  7. Enjoy!

image


Enable XAML Hot Reload

  1. Open the .csproj file of your project and add the following package reference:
<ItemGroup>
	<PackageReference Include="DotNetMeteor.HotReload.Plugin" Version="3.*"/>
</ItemGroup>
  1. Enable Hot Reload Server in your MauiProgram.cs:
using DotNet.Meteor.HotReload.Plugin;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
#if DEBUG
            .EnableHotReload()
#endif
        ...
        return builder.Build();
    }
}
  1. Now you can run your project, update XAML and see updates in real-time!

image


Profile the Application

  1. Open the project folder.
  2. Open the Run and Debug VSCode tab and click the create a launch.json file.
  3. In the opened panel, select the .NET Meteor Debugger.
  4. Specify a profiler mode option (trace or gcdump) in the generated configuration. For example:
{
	"name": ".NET Meteor Profiler",
	"type": "dotnet-meteor.debugger",
	"request": "launch",
	"profilerMode": "trace",
	"preLaunchTask": "dotnet-meteor: Build"
}
  1. In the status bar, select a project (if your opened folder contains several projects) and a configuration (the debug is the default). Click the device name and select a target device/emulator from the opened panel.
  2. Press ctrl + F5 to launch the application without debugging.
Writing gcdump to '/Users/You/.../Project/MauiProf.gcdump'...
command handled by DotNet.Meteor.Debug.GCDumpLaunchAgent
Finished writing 2759872 bytes.
Trace completed.
Writing:	/Users/You/.../Project/MauiProf.speedscope.json
Conversion complete
  1. You can see the speedscope.json report in the root folder of your project. You can use the Speedscope in VSCode extension to view it. Alternatively, you can upload it directly to the speedscope site. For the gcdump report, you can use the dotnet-heapview or Visual Studio for Windows.

image

The profiler can capture and analyze functions executed within the Mono runtime. To profile native code, you can leverage platform-specific tools, such as Android Studio and Xcode.

Troubleshooting

.NET Meteor uses the .NET Diagnostics tools to profile applications. The process of profiling consists of two stages:

  1. dsrouter creates a connection between the application and the profiler.
  2. dotnet-trace or dotnet-gcdump captures the data.

If you encounter any issues, please check the following:


Compatibility

 The following table lists supported .NET target platforms and their capabilities:

Application TypeBuild and RunHot ReloadDebuggingProfiling
WinUI✅*
Android
iOS
MacCatalyst

For debugging of the WinUI applications you should install one of the following extensions: C# or DotRush.Essentials.