Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to I attach to a VSTO Excel Application Process to Debug?

Tags:

c#

excel

vsto

I've got a Excel VSTO 2005 application I need to debug, I've tried attaching to the process EXCEL.EXE in Visual Studio 2005 to no avail.

Does anyone know what to do in order to debug managed code running in a VSTO Excel Application?

like image 930
Matthew Rathbone Avatar asked Oct 20 '25 04:10

Matthew Rathbone


1 Answers

I haven't worked with Excel, but with VSTO in Word, attaching the debugger to the WINWORD process works, but makes it impossible to debug startup code, as it has already ran before you can attach. In this case you can insert

Debugger.Launch();

which will stop your code and ask to attach a debugger. It's about the best solution I could find.

like image 81
Josh Avatar answered Oct 22 '25 18:10

Josh