1

I am unable to set the debugger breakpoint in Visual Studio on client-side C# and Razor code when launching Office Web Add-in. I have tried to manually attach various processes to VS debugger to no avail. Is this something that is currently possible?

I am using the following Microsoft's GitHub example to run Blazor Office Web Add-in for Excel: excel-blazor-add-in

Thanks

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
puri
  • 1,829
  • 5
  • 23
  • 42

1 Answers1

1

Yes, that is possible. I was able to hit the breakpoints by attaching the debugger to the process where your code runs.

Note, you can also use the Debugger.Break method which signals a breakpoint to an attached debugger. The following code example demonstrates how to stop the debugger at the call to WriteLine:

Debugger.Break();  
Console.WriteLine("Hello, world.");  

If no debugger is attached, users are asked if they want to attach a debugger. If users say yes, the debugger is started. If a debugger is attached, the debugger is signaled with a user breakpoint event, and the debugger suspends execution of the process just as if a debugger breakpoint had been hit.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45