I was made aware of an interesting situation by my client today. I am sure it is something simple but seems like I can't put my finger on it. Have never faced this issue and Google has not been too helpful.
Problem
On my client's laptop, the Add-In is created with Add-in Express™ for Microsoft® Office and .net. When running the Add-in from VS, the breakpoints do not trigger. I logged in via teamviewer. We created a new test project (Add-in) and added this simple code.
Private Sub AdxExcelAppEvents1_WorkbookOpen(sender As Object, hostObj As Object) Handles _
AdxExcelAppEvents1.WorkbookOpen
MessageBox.Show ("Hello World")
End Sub
I put a breakpoint on AdxExcelAppEvents1_WorkbookOpen
and ran. I got the message when I opened a new workbook but the breakpoint did not trigger.
I tested the same code on my laptop and it works just fine.
What has he and I tried
- Unregister, Clean + Rebuild, Register
- Manually cleaning the Debug folder
- Repairing Add-In Express
- Uninstalling/ReInstalling Add-In Express
- Jumping between frameworks 4.5 and 4.6, 4.7.1
- Toggling
Tools | Options | Debugging | General require source files to exactly match the original version
- Toggling Solution platforms (x86|64|AnyCPU)
Applications
- Visual Studio Version: 2019 Pro
- MS Office: 2016 Professional Plu 2016
Let me know if you need anything else?
FYI: This has been crossposted at Add-in Express forum I usually do not crosspost but seems like my client is under pressure and has to deliver this project on monday morning.
You can use the method Debugger.Break from
System.Diagnostics
and observe if you get more information about a plausible unhandled exception. In this case, we get the exceptionwkernelbase.pdb not loaded
and Siddharth found it can be fixed by selecting :Tools->Options->Debugging->Symbols->Select "Microsoft Symbol Servers"
.