1

I am loading dll's as plugins in my software. When one of the plugins throws an error, i want my plugin host to catch the exception and print the file and line number at which the error occured. I am unable to get the line numbers for the frames in my stacktrace that are inside the plugin, while my stacktrace Does contain line numbers for the host application.

I placed my plugin's pdb files in the same folder as the plugin folder, but this does not seem to solve the problem.

Note that i do NOT want to attach visual studio to my process, i need to get the line numbers without attaching the debugger.

Any ideas?

EDIT: a lot of people marked this post as a duplicate to Display lines number in Stack Trace for .NET assembly in Release mode. This post does not resolve the issue for me, i am not using release builds, i am using debug builds (with pdb-full set in the properties panel)

Community
  • 1
  • 1
MHGameWork
  • 616
  • 5
  • 14
  • How are you loading the plugins? – Snixtor May 28 '13 at 21:40
  • I copy the dll and pdb to a temporary location, then i simply use Assembly.Load and Assembly.GetTypes to get the types from this assembly – MHGameWork May 29 '13 at 10:25
  • I found the problem, i was naming my files xxxx.tmp.dll an xxxx.tmp.pdb (with xxxx random characters). Apparently the thing locating the pdb's isn't smart enough to see that these files belong together. Removing the .tmp solved the problem. Sadly i can't post my answer as an 'Answer' since everybody seems to think this is a duplicate. – MHGameWork May 29 '13 at 11:01
  • Are you saying the dll and pdb had different file names? *Random* file names? – Snixtor May 29 '13 at 21:36
  • no they have the same, yet random file name. For example: afjkdIOu.tmp.dll and afjkdIOu.tmp.pdb – MHGameWork May 29 '13 at 21:48

0 Answers0