Debug Project 3.1 Test Matrix

Testers

Committers: Kevin Barnes, Darin Wright

Community: Anyone who wants to help, Samantha Chan

JRE Grid

The following JREs should be considered when testing. Committers have been assigned a JRE and platform to test on. The community can chose any JRE and platform.

  JDK 1.4.2 IBM 1.4.2
Win 2000   Samantha Chan
Win XP   Darin Wright
Linux Darin Wright  
Mac Kevin Barnes  

Feature Testing

Evaluations

  • NEW: switch statement
  • Java 5.0 features
    • Generic types
    • enhanced for loop syntax
    • varargs
    • autoboxing
    • enumerations
  • From various contexts
    • Java Compilation Unit editor
    • Java Classfile editor
    • Display view
    • Details area
    • Snippet editor
    • in class files without attached soruce
  • Use key bindings and context menus
  • Use code assist (key binding and context menu)
  • Inspect vs. Display
    • Note that in the Display view and Snippet editor, "Display" prints the result in-line
    • Everywhere else, popups are used to display/inspect the result
  • Persisting the result - i.e. move the result to the Display view or Expressions view
  • In a clean workspace, popups should size reasonable on the first use, afterwhich the popup sizes are persisted and reused

Back to top


Launch Options

  • Build before launch
    • build is scoped to relevant projects
    • Standard job progress dialog is displayed for the following cases. The "Run in Background" button is never present.
      • Launching in foreground (un-check "Launch in background" option on common tab)
        • Waiting for ongoing build to complete before launching
        • Building before launching
    • The progress dialog never appears when launching in the background
      • When waiting for an ongoing build to complete before launching a node appears in the debug view in italics showing "waiting for build"
  • Prompt to launch in face of compilation errors
    • always/prompt
    • NEW: prompt shuold tell you which project(s) contain errors
    • irrelvant errors should not cause prompt (i.e. Ant errors should not prevent Java launch)
  • Prompt to launch in debug mode when breakpoints present
    • always/never/prompt
  • Save dirty editors
  • Launch in foreground/background (controlled via common tab on launch config)

Back to top


Debug View Management

  • Switch to Debug perspective
    • When launching (always/never/prompt)
    • When suspending (always/never/prompt)
  • Activate the Debug view when program suspends
    • Debug action set should also open automatically when a debug view is opened
    • Relevant debug views should automatically open when stack frame is selected
      • In debug perspective by default
      • In other perpectives as configured on the "View Management" pref page (also available in Debug View drop down menu)
      • Use PDA debugger to try debugging different langauges in same perspective (hope to have this available - example from draft debug article)
      • Automatically opened views should close when debugging ends
  • Activate the workbench when a breakpoint is hit

Back to top


Breakpoints

  • Breakpoint groups
    • show breakpoints, breakpoint types, breakpoint working sets, files, projects, resource working sets, advanced
    • auto-add to default breakpoint working set
    • drag & drop between breakpoint working sets (move)
    • copy & paste between breakpoint working sets
    • stratum breakpoints should group by stratum (eg. JSP breakpoints).
  • Creation of different types of breakpoints.
    • Toggle Line breakpoints - double click in ruler, Run menu action (menu & keybinding)
    • Toggle Method breakpoints - Run menu action (menu & acclerator)
      • can be used in editor and editor outline
    • Togggle Watchpoints - Run menu action (menu & acclerator)
      • can be used in editor and editor outline
    • Exception Breakpoints - Run menu action, hyperlink from stack trace
    • Class Load Breakpoint - Run menu, Toggle action from editor outline
  • Refactorings
  • Skip all breakpoints option (manual use of the toggle)
    • groups and breakpoints should be rendered with "skip" (crossed out) line

Back to top


Run to Line

  • Run to Line
    • Context menu
    • Run menu action and keybinding
    • Classfile and Compilation unit editor
    • Preference to "skip breakpoints during run to line" (on main Run/Debug pref page)

Back to top


Logical Structures

  • View variables with logical structures on/off
  • Stepping with logical strutures on/off
  • Works for
    • java.util.Collection (flat list)
    • java.util.Map (list of map entries)
    • java.util.Map (key/value)
  • Selectively turn off logical structures via context menu "Show As > ..."
  • User defined logical structures
    • more than one structure for a type
      • all appear in "Show As > .." menu
      • can choose between structures properly
    • structures persist restore properly across workbench invocations
    • structures with compilation errors
    • structures with runtime errors
    • when two different types (A,B) share the same possible logical structures, their enabled (selected) structure is shared (i.e. if you select "show A as X" then B will also show as X.

Back to top


Watch Items

  • Create
    • From context menu "Add Watch Expression"
    • From variables view context menu "Watch"
  • Persist
  • Enable/disable
  • Update while stepping
  • Update when selecting a different stack frame
  • Errors appear as children of a watch expression (compilation errors, runtime errors)

Back to top


Context Menu Launching

  • Run/Debug from the context and top level Run/Debug cascade menus. Note that before a shortcut's propery tester is loaded, it will appear in the context menu by default. For example, the Java application shortcut requires the "hasMain" tester from the Java debug plug-in, and thus, until the plug-in is loaded, the shortcut will appear on all Java files whether they have a main method or not.
    • Java Applications (with main, without main, compilation unit, type, method, classfile, package, project)
    • Java Applets
    • JUnit tests
    • Ant build, Ant build... (build file, targets in outline and Ant view)
  • The context menu appears in
    • Resource navigator
    • Package explorer
    • Outline view
    • Editor
  • Use keybindings to launch (ALT-Shift-D/X)
    • an active editor
    • a selection in an outline/navigator

Back to top


Runtime Classpaths

  • The default classpath should track a project's buildpath
  • Using a non-default bootpath
    • Prepending and appending to the default bootpath
    • Using an explicit bootpath (i.e. without prepend/append)
  • Using a non-default classpath
    • different types of entries
    • new entry type - String Variables

Back to top


Source Lookup

  • The default source lookup path should track changes in the default buildpath (when using a default runtime classpath). If a non-default runtime classpath is used, the default source lookup path should track the runtime classpath.
  • Searching for duplicate source files
  • Modifying the source lookup path when a source file cannot be found
  • Types of entries on the source lookup path
    • Internal archives
    • External archives
    • Java projects
    • Java classpath variables
    • Directory (external)
    • Folder (in the workspace)
    • Java Library (JRE, required plug-ins, etc).

Back to top


Threads & Monitors

  • Monitor information is shown in the debug view
    • No information/errors for VMs that do not support monitor information
    • monitor information appears for suspended threads
    • monitor information is not displayed for running threads
    • Ensure valid deadlocks are detected
      • threads are rendered red (preference color), and have deadlock overlay

Back to top


Hot Code Replace

  • Valid HCR
    • method changes (existing)
    • changes in existing instance variable initializer
    • affected frames are automatically popped (unless top frame or native method on the stack)
    • change method in declared inner type
    • change method in anonymous inner type
    • default and non-default packages
  • Manually drop to frame
    • works in all methods except last method on stack
    • a native method cannot be dropped (and thus a method above a native cannot be dropped/re-entered)

Back to top


Installed JREs

  • Changing the default JRE triggers a build if the default JRE is referenced by a project.
  • JREs allow a javadoc location to be set per library in the JRE
    • Changing the javadoc location on a JRE updates the buildpath javadoc location
    • Changing the javadoc location on a buildpath (JRE library) updates the JRE
  • Changing a javadoc location or source attachment does not causes an explicit bootpath to be used when launching with that JRE.

Back to top


String Variables

  • Use String Variables in launch configs
    • VM args, program args, main type name
  • String Variable selection dialog

Back to top


Console

  • Show when output to standard out/err
  • Console title bolds when content changes (but not if on top/auto activated)
  • Console input - typing, pasting, pasting multiple lines
  • CTRL-Z/D for EOF when doing console input
  • Pin a console - pin action is specific to console view. When pinned, console should not change in that view
  • Scroll lock - specific to console view. When locked, the console in that view should not scroll
  • Switching between consoles - use the drop down to toggle between consoles. Clicking on the drop-down should toggle between the last two consoles shown
  • Open new console - CVS and Java Stack Trace Console
  • Stack trace console
    • Pasting and navigating stack traces
    • hyperlinks are colored by hyperlink color preferences
    • editing stack traces/clearing console
    • contents are persisted across workbench invocations and close/re-open
    • formatting
  • Hyperlinks for stack traces, link to source code
  • Hyperlinks for exception names allow creation/modification of exception breakpoint settings
  • Use alternate console encoding to display DBCS character set
    • remember to use "-Dfile.encoding=UTF-8" (or whatever encoding) on the VM args
  • Open more than one console view
    • pin a view selectively
    • scroll lock a view selectively
    • key-bindings work in views - FORMAT in Java stack trace console/CTRL-D/Z in process console
  • Multiplex output via common tab
    • a file
    • the console
    • both
    • none

Back to top


Variables

  • NEW: "Find Variable" support and key-binding
  • Changed variables appear red (preference color) when stepping
  • Variables remain expanded/selected as stepping
  • When switching between stack frames (without resuming), the variables expanded/selected are maintained (i.e. expand and select for frame 1, then select frame 2 and expand/select. when re-selecting frame 1, the original state is restored).
  • toString() in-line in the tree viewer
    • for all variables
    • for variables with detail formatters
    • only in the details area
  • Debug hover works for symbols with the same name and different values (inherited fields), showing correct value
  • Changing variable values
    • via "Change Value..." context action
      • dialogs are different for primitives & objects
      • evaluations are supported
      • editing a String value via evaluation and direct editing
    • via CTRL-S in the details area
      • evaluations for objects
      • direct editing for primitives

Back to top


Refactoring

  • launch configuration main type is updated after type rename, type move, package rename
  • launch configuration project is updated after project rename, package move, type move
  • Java breakpoints are updated after type rename, type move, package rename, package move, project rename
    • VM suspend at the new location
    • breakpoint attributes are preserved
    • label is updated
    • marker location is updated (text selected when double-clicking on a breakpoint in the breakpoint view)

Back to top


Applets

  • Main tab
    • specify a project via typing/browsing
    • specify a nonexistent project (should see error if does not exist)
    • specify an applet class via typing/searching (no validation is performed on type name in the tab - error occurs on launch if an invalid type is specified)
    • specify a class that is not an applet (no validation is performed - error occurs on launch if invalid)
    • specify default applet viewer class
    • specify an explicit applet viewer class
  • Parameters
    • specify various width & height
    • specify parameters (available via Applet#getParameter(...))
    • specify applet name - allows Applets to communicate with each other via AppletContext#getApplet(...)

Back to top


Remote Debugging

  • connect to a remote VM
    • try "suspend=y" and "suspend =n" options
    • try different sockets
    • try conneting to a socket that has no VM
    • try "localhost" and "127.0.0.1"
  • terminate should only be enabled when the config specifies that terminate is supported

Back to top


JSP Example

  • Try JSP debugging example, as documented in the "org.eclipse.jdt.ui.examples.javafamily" plug-in ReleaseNotes.html. The instructions are in the section titled "Debugging a JSP"
    • Tomcat launch configuration
    • Breakpoints in JSP files
    • Enable/Disable installed JSP breakpoints
    • Enable/Disable un-installed breakpoints when a target/server is running
    • Changing the stratum displayed via context menu in debug view
    • Stepping in a Java file from a JSP file and stepping back (source lookup should work)
    • Evaluation in the context of a JSP file (requries adding jsp-api.jar, jasper-runtime.jar and servlet-api.jar from /common/lib to the project's build path)

Back to top