Server Side Debugging

  • Breakpoints can be reached from within Visual Studio.

Client Side Debugging

  • Breakpoints can not be reached within Visual Studio.
  • Need to setup Breakpoints from within browser debugger. (Shift + Alt + D)

Note: For Client Side Debugging, you may need to run browser in debugger mode using command line. You will see the following error if your browser is not in debugging mode.

Error:

Unable to find debuggable browser tab

Could not get a list of browser tabs from http://127.0.0.1:9222/json. Ensure your browser is running with debugging enabled.

Resolution

If you are using Google Chrome for your development, follow these instructions:

Press Win+R and enter the following:

chrome --remote-debugging-port=9222 --user-data-dir="C:\Users\chiange\AppData\Local\Temp\blazor-chrome-debug" https://localhost:44303/

If you are using Microsoft Edge (80+) for your development, follow these instructions:

Press Win+R and enter the following:

msedge --remote-debugging-port=9222 --user-data-dir="C:\Users\chiange\AppData\Local\Temp\blazor-edge-debug" --no-first-run https://localhost:44303/

This should launch a new browser window with debugging enabled.

Sources:

https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-5.0&tabs=visual-studio

Last modified: November 30, 2020

Author

Comments

Write a Reply or Comment