0

no idea what I'm doing wrong here. I have two macs at home, one is mine, one is a work laptop. I have VS 2022 Preview installed on both, and .net 6 on both. On my home mac, if I start a new c# Console app I'm able to just stick a break point on the (single) Console.Writeline line, hit debug, and it stops on that line as you'd expect. On my work mac, breakpoints just turn hollow immediately, and debugging the code just runs the code instead. The "Start Debugging" option is just greyed out in the menu bar. I've tried a bunch of things but I just can't work out why this isn't working!

Lance U. Matthews
  • 15,725
  • 6
  • 48
  • 68
simonk83
  • 79
  • 9

2 Answers2

1

I had the same issue and all the other solutions I found did not work for me with VS 2022 (v17.0.6), dotnet6.

It appears it is an IDE Issue and hopefully gets fixed soon. Installing Visual Studio 2019 seems to solve it. Credit here: Visual Studio For Mac 2022 - Cannot execute "{...}.exe".

Out of curiosity, the following appears too 'reset' it back to normal.

  1. Set a breakpoint in your code (mine was hollow when doing so)
  2. Select 'Visual Studio' -> 'Quit'
  3. Re-open your solution and navigate back to your breakpoint

But after selecting "Start Debugging" option, it returns back to its previous state of no debugging.

  • Thanks mate. In the end I completely nuked it, along with .net and anything else related, reinstalled the lot and that's fine apparently :D – simonk83 Jul 14 '22 at 09:45
0

I have had the same problem. The extension ".Net Core Debugger" was disabled and therefore I was not able to debug projects.

Go to Visual Studio -> Extensions -> Installed and check the state