In the Terminal app on your Mac, use the cp command to make a copy of a file. For example, to copy a folder named Expenses in your Documents folder to another volume named Data:% cp -R /Documents/Expenses /Volumes/Data/Expenses. The -R flag causes cp to copy the folder and its contents. Download google chrome, bluestacks app player, android file transfer, picasa, firefox.
Blazor WebAssembly apps can be debugged using the browser dev tools in Chromium-based browsers (Edge/Chrome). You can also debug your app using the following integrated development environments (IDEs):
Available scenarios include:
For now, you can't:
Prerequisites
Debugging requires either of the following browsers:
Ensure that firewalls or proxies don't block communication with the debug proxy (
NodeJS process). For more information, see the Firewall configuration section.
Visual Studio for Mac requires version 8.8 (build 1532) or later:
File Counter App Mac Download
Note
Apple Safari on macOS isn't currently supported.
Enable debugging
To enable debugging for an existing Blazor WebAssembly app, update the
launchSettings.json file in the startup project to include the following inspectUri property in each launch profile:
Once updated, the
launchSettings.json file should look similar to the following example:
The
inspectUri property:
The placeholder values for the WebSockets protocol (
wsProtocol ), host (url.hostname ), port (url.port ), and inspector URI on the launched browser (browserInspectUri ) are provided by the framework.
To debug a Blazor WebAssembly app in Visual Studio:
While debugging a Blazor WebAssembly app, you can also debug server code:
Note
Breakpoints are not hit during app startup before the debug proxy is running. This includes breakpoints in
Program.Main (Program.cs ) and breakpoints in the OnInitialized{Async} methods of components that are loaded by the first page requested from the app.
If the app is hosted at a different app base path than
/ , update the following properties in Properties/launchSettings.json to reflect the app's base path:
The placeholders in the preceding settings:
In the following examples, the app is hosted at
/OAT with an app base path configured in wwwroot/index.html as <base href='/OAT/'> :
For information on using a custom app base path for Blazor WebAssembly apps, see Host and deploy ASP.NET Core Blazor.
Debug standalone Blazor WebAssembly
Note
Breakpoints are not hit during app startup before the debug proxy is running. This includes breakpoints in
Program.Main (Program.cs ) and breakpoints in the OnInitialized{Async} methods of components that are loaded by the first page requested from the app.
![]() Debug hosted Blazor WebAssembly
A
launch.json file is generated with the launch configuration for launching the debugger.
Apple File AppAttach to an existing debugging session
To attach to a running Blazor app, create a
launch.json file with the following configuration:
Note
Attaching to a debugging session is only supported for standalone apps. To use full-stack debugging, you must launch the app from VS Code.
Launch configuration options
The following launch configuration options are supported for the
blazorwasm debug type (.vscode/launch.json ).
Example launch configurationsLaunch and debug a standalone Blazor WebAssembly appAttach to a running app at a specified URLLaunch and debug a hosted Blazor WebAssembly app with Microsoft Edge
Browser configuration defaults to Google Chrome. When using Microsoft Edge for debugging, set
browser to edge . To use Google Chrome, either don't set the browser option or set the option's value to chrome .
In the preceding example,
MyHostedApp.Server.dll is the Server app's assembly. The .vscode folder is located in the solution's folder next to the Client , Server , and Shared folders.
To debug a Blazor WebAssembly app in Visual Studio for Mac:
While debugging a Blazor WebAssembly app, you can also debug server code:
Note
Breakpoints are not hit during app startup before the debug proxy is running. This includes breakpoints in
Program.Main (Program.cs ) and breakpoints in the OnInitialized{Async} methods of components that are loaded by the first page requested from the app.
For more information, see Debugging with Visual Studio for Mac.
Debug in the browser
The guidance in this section applies to Google Chrome and Microsoft Edge running on Windows.
Blazor provides a debugging proxy that implements the Chrome DevTools Protocol and augments the protocol with .NET-specific information. When debugging keyboard shortcut is pressed, Blazor points the Chrome DevTools at the proxy. The proxy connects to the browser window you're seeking to debug (hence the need to enable remote debugging).
Mac Apps DownloadBrowser source maps
Browser source maps allow the browser to map compiled files back to their original source files and are commonly used for client-side debugging. However, Blazor doesn't currently map C# directly to JavaScript/WASM. Instead, Blazor does IL interpretation within the browser, so source maps aren't relevant.
![]() Firewall configuration
If a firewall blocks communication with the debug proxy, create a firewall exception rule that permits communication between the browser and the
NodeJS process.
Warning
Modification of a firewall configuration must be made with care to avoid creating security vulnerablities. Carefully apply security guidance, follow best security practices, and respect warnings issued by the firewall's manufacturer.
Permitting open communication with the
NodeJS process:
If possible, only allow open communication with the
NodeJS process on trusted or private networks.
For Windows Firewall configuration guidance, see Create an Inbound Program or Service Rule. For more information, see Windows Defender Firewall with Advanced Security and related articles in the Windows Firewall documentation set.
Troubleshoot
If you're running into errors, the following tips may help:
Breakpoints in
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |