0

I am writing a Silverlight application that takes advantage of the P/Invoke functionality added to Silverlight 5. I've written a native .dll that takes a bitmap from the managed code and uses a 3rd party library (OpenCV) to process it.

My .dll gets loaded correctly and works fine, but I am not able to hit any breakpoints I set anywhere in the Native code. Visual Studio says that the breakpoint will not be hit as there are no symbols loaded for the document. I tried copying the corresponding .pdb files to the path where the .dll is loaded from, but it didn't help. Additionally, the .dll doesn't show up in the Modules window when debugging, so I can't manually load the symbols that way.

Is there any other way to get the debugger to load the needed symbols?

kylem
  • 31
  • 1
  • 2
  • Check also the project debug settings, see ["Enable unmanaged code debugging"](http://stackoverflow.com/a/5631560/1010666). – Tadej Mali Oct 04 '12 at 12:22

1 Answers1

1

When you start a SL5 app, VS starts a .NET debugger. This debugger is unable to debug native processes.

You could start another instance of Visual Studio, and use the "Attach to process" dialog under the debug menu, and attach the native debugger to the targeted process. Note that I am not sure that you can attach a Native and a .NET debugger at the same time on the same process.

Eilistraee
  • 8,220
  • 1
  • 27
  • 30