How to debug NXOpen C++ Application
How to debug NXOpen C++ Application
(OP)
Hi Can any one tell me how to debus NXOpen C++ application. I am using VS2008 for NX7.5 The information given in NXOpen Help file is not enough. First I am unable to find option to run an external program in Visual studio project properties. When I am trying to attach an exiting process to VS project I am getting error as Unable to find symbol.





RE: How to debug NXOpen C++ Application
Change the NXOpen, NXOpen.UF,.. Refences property "Copy Local" to True. Try executing the program.
To run the NXOpen program in Visual Studio itself then perform the following.
1) Open Start Menu-> Progames->NX Folder->NX Tools->Command Prompt
2) In command prompt type "Start devenv"
3) Visual studio will be opened then Open your project and execute. It will run automatically.
Regards,
Mukundh
RE: How to debug NXOpen C++ Application
1) In VS build your .dll.
2) In Project Properties, under Debug, set Start External program to C:\Program Files\Siemens\NX 10.0\UGII\ugraf.exe (or similar).
3) "Start" in VS will then launch NX.
4) Ctrl-U in NX to select and run your .dll.
5) Breakpoints will be hit, exceptions will drop back into NX.
Paul
Paul Turner
CAD & Process Engineer
Mastip Technology
RE: How to debug NXOpen C++ Application
Your way of working can be used only for Internal applications not for external program.
Regards,
Mukundh
RE: How to debug NXOpen C++ Application
I was facing problem because I am using VS2008. And in C++ project properties we dont have the option to set external program. Indeed we have something called as COMMAND & COMMAND LINE ARGUMENTS under project properties for the same purpose I believe. When I am trying to run NX by entering the path of ugraf.exe in "COMMAND", it is throwing an error on debugging "SYMBOL Not Found". So, I tried launching NX & then linked the VS project through "attach to Process" option. It got linked & from NX I ran the dll file & as Paul suggested it hit the breakpoint. For now I am working on internal applications & so it serves the purpose.
Appreciate your help.
RE: How to debug NXOpen C++ Application
Regards
Carl