Problems debugging add-in using Visual Studio Express

Problems debugging add-in using Visual Studio Express

DRoam
Mentor Mentor
1,185 Views
6 Replies
Message 1 of 7

Problems debugging add-in using Visual Studio Express

DRoam
Mentor
Mentor

I'm trying to debug an add-in using Visual Studio Express by following the steps under the "Debugging with Visual Studio Express" section (page 28) of this guide by @BrianEkinsCreating Add-Ins for Inventor.

 

However, it doesn't seem to be working. I'm having two problems:

  1. All of my breakpoints show a warning that says: "This breakpoint will not currently be hit. No symbols have been loaded for this document." I searched for this online but the few recommendations I found didn't work.
  2. Regardless, it doesn't appear that Inventor is running the add-in from Visual Studio, anyway. I think it's still loading and running it from the add-ins folder. If I make a change to my code (such as adding a message box), then unload/reload in Inventor, the change is not reflected. I even tried rebuilding after making such a change (with the post-build 'copy to add-ins folder' event disabled), but the change still isn't reflected in the add-in execution.

How can I fix the breakpoint issue, and how can I get Inventor to load the add-in from Visual Studio while it's attached?

0 Likes
1,186 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

you need to copy the files via VS to the mandatory folders first. For example use the debug path to copy this.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 7

DRoam
Mentor
Mentor

Which files? And which folder is "the mandatory folder"?

0 Likes
Message 4 of 7

bradeneuropeArthur
Mentor
Mentor

2) Copy add-in dll file to one of following locations:
a) Anywhere, then *.addin file <Assembly> setting should be updated to the full path including the dll name
b) Inventor <InstallPath>\bin\ folder, then *.addin file <Assembly> setting should be the dll name only: <AddInName>.dll
c) Inventor <InstallPath>\bin\XX folder, then *.addin file <Assembly> setting shoule be a relative path: XX\<AddInName>.dll

3) Copy.addin manifest file to one of following locations:
C:\Users\<user>\AppData\Roaming\Autodesk\Inventor 20##\Addins\

 

the first step 1 and 2:

Debug location.PNG

debuging2.JPG

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 7

BrianEkins
Mentor
Mentor

There are two things I can think to check.

 

  1. The first is to make sure you have the add-in set to NOT LOAD on startup in the add-in manager.  You want to control when it loads after you've done the attach to process.
  2. The second is something that I forgot to put in the paper.  You want to make sure your current configuration is set to "Debug", as shown below.

ActiveConfiguration.png

 

The steps in the paper should be good after that.  From Visual Studio Connect to the Inventor process, and then from Inventor in the Add-In Manager, load your add-in.

 

 

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 6 of 7

tdant
Collaborator
Collaborator

I've had the issue with the breakpoints also. The problem for me was that the symbols file wasn't updating with each new build. I solved it by deleting the whole bin folder (the one in the Build output path bradeneurope indicated) and rebuilding.

 

It might also be worth mentioning that the latest version of Visual Studio's Inventor addin template automatically copies the project outputs to %AppData%\Autodesk\ApplicationPlugins. It can be hard to tell what dll file is actually being used by the addin.

 

If your debug settings are working correctly, you should be able to start debugging from VS with Inventor completely closed. VS will start an instance of Inventor and use the files in the build output path for the purposes of debugging.

0 Likes
Message 7 of 7

SometimesInventorMakesMeAngry
Advocate
Advocate

@DRoam Did it work for you? It's not working for me.

0 Likes