04-18-2013 05:01 PM
I read the instruction below for debugging a .net dll, but i can't get it to work. It doesn't stop at the breakpoint I set in the c# code. When I run this process, where does the DLL has to be relative to the C# code?
http://digital.ni.com/public.nsf/allkb/6229347C7982CC81862576E30076A4AE
04-18-2013 07:06 PM
I've done this a few times, and if I recall correctly it was important that you use a Debug build for the assembly (ie. optimise flag off and debug flag on when building the assembly via the C# compiler). This way the compiler didn't perform any optimisations and numerous NOP statements still exist in the MSIL to enable debugging and breakpoints. I also had the nameofassembly.pdb in the same folder as the dll.
Hope this helps.
04-18-2013 07:19 PM - edited 04-18-2013 07:20 PM
I've attached the same basic example that the link you posted suggests. The VS solution is in 2012, but should be compatible with 2010. It contains a single assembly that is a static class (AddNumbers) with a single static method called Add. There is also a LabVIEW VI in the attachment that calls this static method.
When I attach to LabVIEW process in VS, put a breakpoint at the return statement and then run the LabVIEW VI, VS halts execution at that breakpoint.
See if this simple example works on your setup and take it from there.
04-18-2013 07:39 PM
Theere was a problem this the reference in my last post (I was lazy and didn't include a project), try this attachment instead.