Aspnetcore.docs: Add documentation for debugging in VS4Mac

Created on 11 Aug 2020  ยท  12Comments  ยท  Source: dotnet/AspNetCore.Docs

Let's add docs on debugging Blazor WASM on VS4Mac since this will ship in VS4Mac 8.8.


Document Details

โš  Do not edit this section. It is required for docs.microsoft.com โžŸ GitHub issue linking.

5.0 Blazor P1 Source - Docs.ms doc-enhancement

All 12 comments

I keep my VS4Mac on the stable channel. If you're ok with my performing the update on the day that 8.8 releases, then I can handle the update.

In theory, I could switch it back at Pre2 and do the update, but this iMac is sooooooo old that it takes forever for it to swap VS across channels. Since the updates to the topic will be easy/quick, I think I could pull them off same-day.

I keep my VS4Mac on the stable channel. If you're ok with my performing the update on the day that 8.8 releases, then I can handle the update.

Yea, no rush to write this up. Just wanted to make sure that we are tracking this.

Content wise, I was thinking we could just update the heading for debugging on VS to "Debugging on Visual Studio/Visual Studio for Mac" and then update the keyboard shortcuts. Thoughts on this?

Ideally, we'll go with our usual tooling tab control. I meant to do that for what we have now, but you know the story ... ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿ˜…๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿƒ๐Ÿ˜….

VS for Mac 8.8 P2 is out today. Happy to help with any screenshots or review.

I'll put my iMac on the preview channel and work this first thing Wednesday morning.

We try to avoid screenshots, and we might be pulling a few from existing content. For IDEs and the Azure portal, they change every _6.27 minutes!_ :smile:

@captainsafia ... ~Ran into an issue this morning without an obvious solution:~

  1. ~Took VS to the preview channel. Received v8.8 Build 1532.~
  2. ~Installed .NET 5 Pre8.~
  3. ~Created a new hosted Blazor WASM solution. Target: net5.0 Shared: 5.0.0-preview.8.20414.8~
  4. ~Debugging works in the Server app of the hosted project (WeatherForecastController). My breakpoint is hit.~
  5. ~Debugging does not work for the counter increment (currentCount++;) of the Counter page. The breakpoint is not hit.~

~Notes: I also tried a 3.1 app. Although a restart shouldn't be required, I did that, too.~

~:ear:~

Nevermind ... I'm good here.

~Also ... a few more โ“ ...~

  1. ~Is debugging in the browser Debug in the browser section not supported on macOS/Safari?~

    ~If not supported, I'll need to add a line to that section ...~

    ~The guidance in this section only applies to debugging on Windows with Google Chrome or Microsoft Edge.~

  2. Same question for the Browser source maps section ... does that require a qualification line? If so, use the same line :point_up: or something else?

  3. ~For the Prerequisites section:~

    • ~Is the minimum supported Safari version 13.1.2 or later? (v13.1.2 is the current version here.)~
    • ~Does debugging on macOS only work with Safari?~

EDIT ... Looks like I'll only need feedback now on 2.

The only problem I see with .NET 5 preview 8, which also affects .NET Core 3.1, is that it takes a while before the breakpoints work. VS Mac does not correctly indicate that the breakpoints are not yet enabled. This is a known bug. Eventually the breakpoint is enabled and can be hit.

Safari is not supported. Only Edge and Chrome are supported.

Safari is not supported. Only Edge and Chrome are supported.

That would explain my problem. I'll install Chrome. Thanks for the tip!

takes a while

This initial test is just for the counter increment after waiting several seconds. Also by the time the user gets to testing the controller the app has been running a while. We also have the remark on this delay earlier in the topic. I think we'll be ok on this one. EDIT ... I think I'll elevate that remark to an additional NOTE down in the content. It bears repeating to reinforce the concept.

Ok ... it works ... _BUT_ ...

  • It seems like it's necessary to use Google Chrome when the app starts ... i.e., Chrome must be selected in VS4Mac for the Debug run before starting the debug run. I wasn't able to select Safari, start, then open Chrome and get debugging to run.
  • It was _very slow_ to react to the breakpoint being hit ... several seconds, especially because I'm using an ancient 2009 iMac (๐Ÿ‘ด Yikes!) and this iMac is slow at everything ๐ŸŒ.

I have enough now to get the PR in ... will do that now and ping for review.

Correct - Chrome or Edge need to be selected in the main toolbar before you start the debug run. If Safari is selected VS Mac does not launch the Blazor debugger when you debug the project.

It seems to be much slower for the breakpoint to be enabled/verified with .NET 5 preview 8 than with .NET Core 3.1.401. It is much more difficult to miss the breakpoint with .NET Core 3.1.401 - you have to be quite fast there.

The Debug in the browser guidance seems like it's about to work ... but I haven't quite got it running yet.

Was this page helpful?
0 / 5 - 0 ratings