1

I'm trying do learn how to implement a RTD Server for Excel.

I found this project https://www.codeproject.com/Articles/5343545/Create-Csharp-DCOM-Simple-Server-to-Use-Excel-RTD that I could build and use it in the excel with success.

But to understand the code I need to debug the code setting some breakpoints and inpecting line by line and the variables.

How can I debug a COM RTD Server C# implementation in Visual Studio ?

Kleyson Rios
  • 2,597
  • 5
  • 40
  • 65
  • Just start or attach to the process where code runs, put a breakpoint in a line of your code and it should work. Another solution is to put a `Debugger.Launch();` (https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.debugger.launch) code somewhere and just-in-time debugging will ask you how you want to debug. See also https://stackoverflow.com/questions/3759308/difference-between-debugger-launch-and-debugger-break – Simon Mourier Aug 29 '23 at 22:24
  • thanks @SimonMourier. using attach to the process works. Would you like to post an asnwer ? I will check it as asnwered. – Kleyson Rios Aug 30 '23 at 12:07

1 Answers1

0

You can just start or attach to the process where code runs, put a breakpoint in a line of your code and it should work.

Another solution is to put a Debugger.Launch() statement somewhere in your code and just-in-time debugging will ask you how you want to debug (this needs proper configuration which should be ok by default).

See also Difference between Debugger.Launch and Debugger.Break

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298