RE: [ExcelDna] Debugging and "Cannot find or open PDB file"

224 views
Skip to first unread message

Govert van Drimmelen

unread,
Feb 6, 2018, 7:06:53 AM2/6/18
to exce...@googlegroups.com

Hi Simon,

 

  1. It seems Visual Studio sometimes remembers the type of debugger to use for a particular process, and it might think it should use only “native” debugging for Excel, or only start debugging for .NET 2.0. To also support “managed” debugging for .NET 4.0, do the following:
    1. Start Excel process outside Visual Studio
    2. Select Debug -> Atcch to Process
    3. Select the EXCEL.EXE in the list, then click the “Select” button in the middle, and tick the “Managed (…v4.0)” option.
    4. The click Attach to attach to the process.
    5. Once you’ve done this, Excel seems to remember what to do next time you start debugging normally be pressing F5.

 

  1. Make a new add-in and check that debugging works.
  • Create a new Class Library (.NET Framework) project
  • Install the ExcelDna.AddIn package
  • Add some public static function in a public class
  • In the Project -> Debugging settings remove the %1 in the “Start external program” path it it’s there
  • Put a breakpoint in your code
  • Press F5 to start Excel, call a function and see that the breakpoint is hit

 

-Govert

 

 

From: 'Simon Ziegler' via Excel-DNA [mailto:exce...@googlegroups.com]
Sent: 5 February 2018 12:48
To: Excel-DNA <exce...@googlegroups.com>
Subject: [ExcelDna] Debugging and "Cannot find or open PDB file"

 

Hi Govert,

 

I am a long term user of ExcelDNA for a personal project. Having done no development for 2 or 3 years, I have recently come back to the project, and needed to update to VS 2017 and to the latest version of ExcelDNA (I was on version 0.32.x and am on the latest as of yesterday). I am finding that my dll that integrates with ExcelDNA cannot be debugged due to VS not finding the PDB file. When I try to load it explicitly it is not recognised.

 

I am beginning to wonder if there is a change to how I need to reference ExcelDNA to enable the PDB file that is generated on compilation to be referenced?

 

I apologise for the breadth of the question, however I am rather at a loss at the moment.

 

Kind regards,    Simon

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages