Select theme:
This topic shows the debugging capabilities of Radzen Blazor Studio. When you debug your Blazor application you run it with a debugger attached. Debugging allows you to see how your application behaves at runtime. You can step through your code and inspect the values of properties, fields and variables. You can also examine the execution path by stepping in and out of methods.
Note: Debugging is a premium feature introduced in v1.4.0.
To debug your Blazor application you need to start it with the debugger attached:
Radzen Blazor Studio will build the application and run it with a debugger attached (if the there are no build errors of course).
The application will execute until it reaches a breakpoint or unhandled exception.
To stop debugging:
Note: Debugging WebAssembly applications requires a specific browser to be installed - either Google Chrome or Microsoft Edge. Radzen Blazor Studio prefers Google Chrome if both browsers are installed.
Breakpoints tell the debugger to stop at a specific line of code. When the debugger is stopped at a breakpoint you can inspect the variables available in the current scope either from the Variables pane or by hovering them in the code editor.
To add a breakpoint:
You can add breakpoints before or after starting the debugger. Breakpoints are supported in C# code only - in .cs
and .razor
files.
The Breakpoints pane shows all breakpoints in the application. You can disable breakpoints or remove them. The debuger will not break if it reaches a disabled breakpoint.
You can also configure the debugger to break on unhandled and or all exceptions.
When the debugger reaches a breakpoint it will stop the application and focus Radzen Blazor Studio. You can then use the debugging tools to step through the execution path.
Press F11 (or click ) to step inside a method call. The debugger advances in the first line of the method.
When you are on a line of code that is a method call, you can press F10 (or click ).
This advances the debugger without stepping into the method (the code still executes).
To advance the debugger out of the current method press SHIFT+F11 (or click ). The debugger will go back to the code
that called that method.
To continue the app execution press F5 (or click ). The application will run intil it reaches a breakpoint.
Make sure you are not debugging the application with other tools (e.g. Visual Studio) or the application isn't already running. Try restarting Radzen Blazor Studio.
WebAssembly debugging relies on the remote debuging feature of Google Chrome or Microsoft Edge. This feature requires Radzen Blazor Studio to start a new browser process. Google Chrome and Microsoft Edge however keep only one instance thus prohibitting remote debugging. Close all browser instances and try to start the debugger again.
WebAssembly debugging requires Google Chrome or Microsoft Edge. Radzen Blazor Studio will use your default browser when you start the application without debugging or if the application is Blazor Server.
Radzen is free to use. You can also test the premium features for 15 days.
Download NowSelect theme: