home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Java++ / VJ / REDIST / JAVADBG.TXT < prev    next >
Encoding:
Text File  |  1997-01-20  |  4.6 KB  |  116 lines

  1. ActiveX debugger support for the Microsoft Virtual Machine for Java
  2. ===================================================================
  3.  
  4.  
  5. ActiveX Debugging Mode
  6. ----------------------
  7.  
  8. This ActiveX debugger implementation runs in a special mode of the Microsoft
  9. Virtual Machine for Java that must be enabled at startup.  You can enable that
  10. mode by running "SetDebug.exe", as described in the next section.
  11.  
  12. The ActiveX debugging mode of the VM is enabled by the existence of a registry
  13. key: "HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM\ActiveXDebug".
  14.  
  15. This mode of the VM has two side effects that reduce the VM's performance:
  16.  
  17.     1) The just-in-time Java compiler is disabled.
  18.  
  19.     2) A debugger-instrumented bytecode interpreter loop is used.
  20.  
  21. To improve normal performance, you may wish to only enable the VM's ActiveX
  22. debugging mode while debugging Java classes.
  23.  
  24.  
  25. SetDebug.exe
  26. ------------
  27.  
  28. A utility app called SetDebug.exe is provided to enable / disable the ActiveX
  29. debugging mode of the VM, and to add / remove path elements from the source
  30. path.  SetDebug is installed in the Windows directory.
  31.  
  32. Invoking "SetDebug", without any arguments, displays a dialog box that allows
  33. you the enable / disable the ActiveX debugging mode of the VM.  It creates or
  34. deletes the ActiveXDebug registry key.
  35.  
  36. "SetDebug -?" displays a description of SetDebug's command line options:
  37.  
  38.     Usage:
  39.     -d              Disable ActiveX debugging for Java.
  40.     -e              Enable ActiveX debugging for Java.
  41.     -p <path>       Append <path> to the Java source path.
  42.     -r <path>       Remove <path> from the Java source path.
  43.  
  44. E.g., "SetDebug -p c:\Sources" appends the "c:\Sources" path to the source
  45. path. "SetDebug -r c:\Sources" removes it.
  46.  
  47.  
  48. Java Source Code
  49. ----------------
  50.  
  51. Source code for most of the Java system classes is included in this release.
  52.  
  53. The VM can read the Java source code from the classes.zip file just like it
  54. reads the Java classes from that file.  There is no need to unzip the
  55. classes.zip file, unless you wish to view the system classes' source code
  56. outside the debugger.
  57.  
  58. The VM searches for the source code for Java classes similar to the way that it
  59. searches for class files.  The VM first searches the source path, followed by
  60. the class path, for a source file.  Source code for a class must be located in
  61. the same package location as the class.  This does not necessarily mean the
  62. same container.  E.g., if you have your class path set to include the
  63. "c:\Classes" directory, and your source path set to include the "c:\Sources"
  64. directory, the VM could find the foo.Bar class as "c:\Classes\foo\Bar.class",
  65. and Bar's source code in "c:\Sources\foo\Bar.java".
  66.  
  67. The VM reads the source path from the "SourcePath" string value of the
  68. "HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM" registry key.  The VM reads the
  69. class path from the "ClassPath" string value of the same key.  The source path
  70. value can be manipulated using SetDebug, as described in the previous section.
  71.  
  72.  
  73. Debugger
  74. --------
  75.  
  76. You cannot debug Java applications outside of Internet Explorer, e.g., under
  77. JView.exe.
  78.  
  79. The debugger comes up with the Java class tree view fully expanded.  You can
  80. expand or collapse package views by clicking on the plus / minus sign to the
  81. left of a package name.
  82.  
  83. The debugger can still break and step in methods for which it does not have
  84. source code, e.g., when you invoke Internet Explorer->Edit->Break at Next
  85. Statement.  No source code or bytecode disassembly is displayed.  If you can't
  86. tell where you are, look at the Call Stack window.
  87.  
  88. In can be difficult to tell whether the debuggee is in a running state or in a
  89. break state from the debugger.  The Call Stack window will display "<Running>"
  90. while the debuggee is executing, and a call stack when the debuggee is stopped
  91. in the debugger.  Also, the toolbar execution buttons are disabled while the
  92. debuggee is executing, and enabled when the debuggee is stopped in the
  93. debugger.
  94.  
  95. There is no Threads window in the debugger to allow you switch between running
  96. Java threads.  Try opening the Java source document containing the code you
  97. wish to debug, and setting a breakpoint there.
  98.  
  99.  
  100. Immediate Window
  101. ----------------
  102.  
  103. The "JAutoExp.dat" file installed in the Windows directory allows you to
  104. customize the way Java classes are displayed in the Immediate window.  See that
  105. file for details.
  106.  
  107. You cannot evaluate expressions that include Java methods in the Immediate
  108. window.
  109.  
  110.  
  111.  
  112.  
  113. The issues listed above will be addressed in future releases of the Microsoft
  114. Virtual Machine for Java.
  115.  
  116.