×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to debug NXOpen C++ Application

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

Are you able to run the external NXOpen application? If No.
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

Here's how we roll:

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

Hi Paul,

Your way of working can be used only for Internal applications not for external program.

Regards,
Mukundh

RE: How to debug NXOpen C++ Application

(OP)
Thanx Paul & Mukundh for your reply.

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

If you are using additional libraries, such as Boost or Qt, beware. UG ONLY supports compile flag of -MD NOT -MDd

Regards
Carl

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources