Frage

I use Visual Studio 2010, C#, .Net 4.0.

I know how to create Excel Add-Ins that work pretty fine. But I'm a bit confused what the VS2010 is actually doing while debugging the add-in projects.

It seems that VS2010 uses a special format of "calling" the Excel when VS2010 calls the Excel in the debug mode. Then Excel looks into Bin directory of the Add-In project, looks through all the files (the generated .dll, .vsto file, maybe .manifest or some other files), loads the Add-In and sends back to VS2010 some notifications when something wrong happens.

As you can see, I have no idea how it actually works. So the question is whether you can anyhow direct me how to find any descent documentation describing this process of debugging the Excel Add-Ins.

I would really appreciate any comments where to start from. Thanks a lot!

War es hilfreich?

Lösung

VS installs your add-on as a normal Excel add-on when you start a debug session. It then launches Excel, and attaches itself as a debugger to Excel.exe. The VS debugger is quite capable of differentiating native code from .NET code.

It's been quite a while ago since I last wrote an Office add-on, but if memory serves, VS 2010 does not clean up after itself. It does not remove the add-on from Excel when the debug session terminates. You may have to do that manually. There may or may not be a context-menu item at the project node in in the solution explorer pane in VS that might uninstall it.

Just to be clear: Excel doesn't know about your debug session. Debugging is solely the purview of the VS debugger and the Win32 debugger APIs.

Debugging your add-in should be very straight-forward and should not contravene the established VS debugging experience. If you have some specific question regarding the process I would recommend asking that.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top