Blazor Wasm Client debugging issues

EuroEager2008 21 Reputation points
2021-01-22T21:35:33.403+00:00

Debugging a web assembly client application is quite different to a "normal .Net" application (e.g. Blazor server side).
Examples:
Intellisense in watch window doesn't work.
Hexadecimal display in watch window is available, but does not work (always decimal), writing debug message to output windows by System.Diagnostics.Debug.WriteLine() does not work.
Objects are shown differently in watch window (e.g. string is shown with single-quotes instead of double-quotes.
Edit value in watch windo is available, but edit/enter shows an error message box: "Invalid expression (Invalid expression)", quite sense-less to me.

I am pretty sure the list could be longer, but these are for now.

Is there something weird with my setup?
Asking because I haven't seen anything on web regarding these issues from other devs
(Windows 10 20H2 (19042.746), Vs2019 16.8.4, .Net 5)

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,413 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
949 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ahmed Alejo 76 Reputation points
    2021-01-23T09:15:35.44+00:00

    @EuroEager2008 your setup is ok, the problems you mentioned exist and are accurate as of the time of writing this.

    Other developers face this as well,

    • But most are still in the process of getting used to Blazor, overwhelmed by its hype, they have not gotten so deep that issues with debugging would be a focus.
    • While some(that have gotten past the learning curve) simply focus on requesting major blocker feature like HotReload similar to https://www.livesharp.net/blazor and consider it a new tech with some issues.

    Hopefully with an HotReload, that's even better than Livesharp, debugging variables would be less necessary.


0 additional answers

Sort by: Most helpful