2 Replies Latest reply: Nov 16, 2012 1:48 PM by ptc-4810159 RSS

    Best way to debug jlink?

    ptc-4810159 Copper

      New to Creo, new to JLink.  New to Java too, but very familiar with .NET programming, so reading and writing java code seems natural.

       

      With help from PTC support, I was able to get the synchronous sample jlink\jlink_appls\jlinkexamples working.  (PTC support gave me a batch file that sets all the environment variables as needed, compiles the java and launches Creo).

       

      I installed Oracle JDeveloper 11g Release 2 and have been able to view and modify the code (with all the niceties of intellisense and error checking).  I still compile and launch my changes with the batch file, and my changes are working nicely.

       

      Now I would really like to run this as a debug session, but I am not sure what the best approach is. I did go back into the batch file and add the flags for debug information to be included.  Most of the existing discussions I can find talk about NetBeans and Wildfire (here I am clueless).  Oracle Developer wants me to pick a Default Run Target, but does not want me to pick parametric.exe.

       

      I figure I need to launch Creo first, then attach to it in order to debug (this is how I am used to debugging .Net extensions to other applications).  I do have the option of attaching to "CPU Profilee" or "Memory Profilee" but not sure how or if this applies in this case.


      Anyone willing to help me sort out the pieces I am missing?

        • Re: Best way to debug jlink?
          jkent Bronze

          I use Netbeans as my IDE. To attach a debugger I set this config.pro option,

          jlink_java_command C:\Program Files\Java\jre6_24\bin\java.exe -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

           

          I then start Creo and attach the debugger.

            • Re: Best way to debug jlink?
              ptc-4810159 Copper

              As stated in my original post, I have no clue what NetBeans is.  It might be the answer, but I need more info. Where should I go to download it? Or do I already have it and just have to change settings? I am working on Windows, does that matter?  What is config.pro? Where does it go? How should I set its information?