Showing results for 
Search instead for 
Do you mean 

How to debug c# DLL


I am running a sample project "AssemblyViewer" provided in the NXOPENSAMPLEAPPLICATION in C# using Visual Studio.


I am trying to debug the Visul Studio Solution. Below are the steps i followed(Regular approach) to debug. 


  1. Set breakpoint(s) in in your NX Open code in the Visual Studio editor
  2. Compile your NX Open code into a .dll
  3. Start NX
  4. In Visual Studio, pick Tools, Attach to Process
  5. Find the NX process (ugraf.exe) and select it as the process to attach to
  6. Run the NX Open dll in NX (File, Execute NXOpen)

When i Run the dll (using Ctrl + U) it does not hit the break points. The application runs. The pdb file is available in the same location along with the dll.


Am i following the right method or Is there anything i am missing ?





Re: How to debug c# DLL

That is the process that I use successfully with Visual Studio and VB.

Re: How to debug c# DLL

Have you tried putting a break point just after the entry point (where NX calls your code)?

Try writing a line to the syslog at the same spot (or before/after it).  Then check in the syslog those lines are being written.


Are you using the correct version of Vis Studio for your version of NX?

(You did not state what version of NX you are using!)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled

Re: How to debug c# DLL

Yes I have a break point at the entry point and also wrote a line to syslog. The lines are being written. But it does not hit the break point.

I am using Visual Studio 2013 for NX7.5 with .Net framework 2.0 and Win 8.1 OS. I know its not the "officially" supported version. But I am compiling and building using .Net 2.0

Re: How to debug c# DLL

[ Edited ]

You should follow versions:-

 NX7.5 is compatible with VS2008, NX8.5 with VS2010, code will be susseccfuly built up if you will not follow compatibility, but it wil not hit breakpoints during debug i.e. you will not be able to debug




Re: How to debug c# DLL

Is there any tweak available?

(+91-9740 821 715)

(Sent from OnePlusOne-Cyanogen)

Re: How to debug c# DLL

I have struggeled a lot running VS2010 code in NX75,

One thing i want to ask is that code written in VS2013? You can change the code version by editing .sln file.

Microsoft Visual Studio Solution File, Format Version 11.00.
 Visual Studio 2010.
Replace with:
Microsoft Visual Studio Solution File, Format Version 10.00. (I)
 Visual Studio 2008. (II, optional)

So VS2010 will change to VS2008 & will work with NX75