/projects/netbeans-7.3/javacard.project/javahelp/org/netbeans/modules/javacard/project/docs/help/DebuggingApplications.html

https://gitlab.com/essere.lab.public/qualitas.class-corpus · HTML · 70 lines · 66 code · 4 blank · 0 comment · 0 complexity · 43b61c28e9b16ed21dc527d45ab53bfc MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html lang="en-US"><head>
  4. <!-- GenHTML revision 23224--> <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  5. <link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
  6. <title>Debugging Applications - Java Card 3 Development
  7. </title></head><body class="body"><a name="DebuggingApplications"></a><h2>Debugging Applications</h2>
  8. <p class="p">Debugging is the process of examining your application for errors. The process of debugging is accomplished by setting breakpoints and watches in your code and running it in the debugger. This enables you to execute your code one line at a time and examine the state of your application in order to discover any problems.</p>
  9. <p class="p">The Java Debug Wire Protocol (JDWP) used by the IDE is heavy for
  10. a small VM such as that provided by the Java Card RI. Consequently, the Java Card RI uses
  11. KVM Debug Wire Protocol (KDWP) to provide a minimum set of debugging capabilities. The
  12. debugproxy translates and sends the translated JDWP commands from the IDE to the Java Card RI
  13. in KDWP format. Responses from the Java Card RI are converted into JDWP format by debugproxy
  14. before it sends them to the IDE. </p>
  15. <p class="p">The communication between the Java Card RI, debugproxy, and the IDE happens through sockets. Socket based communication enables developers to debug cjcre from remote hosts. For example, the Java Card RI could run on machine1, debugproxy could run on machine2, and the IDE could run
  16. on machine3. Developers can also run the Java Card RI, debugproxy, and the IDE on same
  17. host.</p><p class="p">Ports used by IDE communication to and from debugproxy and debugproxy communication to
  18. and from the Java Card RI are distinguished by the names &#8220;listen port&#8221; and &#8220;remote
  19. port&#8221; respectively.</p>
  20. <p class="p">The Java Card platform debugger uses IDE menus and procedures for debugging applications. When you start a debugging session, the debugger windows appear automatically at the bottom of your screen. You can also debug applications that are running on a remote machine by attaching the debugger to the application process. See the appropriate Java Card 3 platform documentation on the Java Card 3 Kenai project site for detailed information about the Java Card 3 platform debugging protocol and procedures.</p>
  21. <p class="p">The following topics describe the basic sequence of activities completed by a developer
  22. when debugging an application for the Java Card 3 platform:</p>
  23. <table cellspacing="1" cellpadding="1" border="1">
  24. <tr>
  25. <td>Task</td>
  26. <td>Use the IDE to:</td>
  27. </tr>
  28. <tr>
  29. <td>Prepare to run the debugger</td>
  30. <td><ul>
  31. <li><a href="SettingBreakpoints.html">Set breakpoints in your code</a>:<br>
  32. Debug &gt; New Breakpoint
  33. </li>
  34. <li><a href="SettingWatches.html">Set watches in your code</a>:<br>
  35. Debug &gt; New Watch
  36. </li>
  37. </ul></td>
  38. </tr>
  39. <tr>
  40. <td>Run the debugger</td>
  41. <td><ul>
  42. <li><a href="StartingDebugging.html">Start a debugger session</a>:<br>
  43. Debug &gt; Debug Project<br>
  44. Debug &gt; Debug File</li>
  45. </ul></td>
  46. </tr>
  47. <tr>
  48. <td>Monitor your code</td>
  49. <td><ul>
  50. <li><a href="SteppingThroughCode.html">Step through your code</a>:<br>
  51. Debug &gt; Step <i>option</i></li>
  52. <li>View debugging information.</li>
  53. <li>View application threads.</li>
  54. <li>Fix any errors and continue debugging.</li>
  55. </ul></td>
  56. </tr>
  57. <tr>
  58. <td>Finish the debugger session</td>
  59. <td><ul>
  60. <li>Stop the debugger:<br>
  61. Debug &gt; Finish Debugger Session</li>
  62. </ul></td>
  63. </tr>
  64. </table>
  65. </body>
  66. </html>