The NetBeans Debugger Interface: Session View

For: NB 3.4 Debugger Interface
Revision History: in CVS Repository

Contents:


Introduction

The sessions component is used to display a list of all the debugging sessions running in the IDE current moment.

This document doesn't discuss general behavior of a debugging session (e.g. what happens when an exception is thrown in the process), nor how a session gets created.

Each session can be thought of as having:

  • a "debugging engine"
  • a program
  • an (optional) process
  • a state

Session List

Appearance

Standard list. Initial set of columns are Name and State. One session is always the current one (unless there are no sessions)

Behavior

Standard behavior only.

Session Row

Appearance

Standard Properties

All debugger types must provide at least two properties for each session:

  • Name: a name used to identify the session
  • State: a description of the current state of the session
Name Column

The Name column is the identifier column for the session component.

The name should be some identifier which will be meaningful to the user. This name will be used not only in this list, but elsewhere in the IDE interface when the session needs to be identified (for instance, in the list of sessions in the Finish dialog).

The NetBeans debugging architecture must assure that this name is always unique. If a debugger engine tries to register a session with a name that already is being used, the debugging architecture should append a numeric suffix to name the name unique (this should be a suffix of the form " (#)" where # is a number.

The debugger engine should be able to change the name of the session at any time. For example, the Dbx Debugger will use the name of the program being debugged for the name. If the process calls exec(), then the debugger engine will change the name of the session to the new program name.

An icon must be shown to the left of the name. This icon must distinguish whether the session is the "current session". Individual debugger engines may add a badge to the icon if they wish.

State Column

This reflects the overall state of the session. In most cases, this corresponds to the state of the process associated with the session. All debugger engines must support a "Running" state, which indicates that the process has been started and is currently executing instructions.

The state column should always have an icon to the left of the state value. The debugging architecture should provide standard icons for the running state. Each debugger engine should provide icons for any additional states they show.

Behavior

All sessions must respond to the following actions:

  • Make Current: Makes the selected session the current one
  • Pause: suspends execution in a process and puts the session into the paused state
  • Continue: resumes execution of a process and switches the session to the running state.
  • Run to Cursor: When the process is in a paused state, continue execution until execution reaches the line of source code containing the cursor OR until the process is paused for some other reason.
  • Step Into: When the process is in a paused state, follow the next function invocation on the current line of source.
  • Step Over: When the process is in a paused state, continue execution to the next line of source code in the current file, or until the process is paused for some other reason.
  • Step Out: When the process is in a paused state, continue execution until the first instruction in the function that invoked the current one, or until the process is paused for some other reason.

Debugger engines are encouraged to support these additional actions:

  • Kill: destroys the process, but retains the session and program. Puts the session into a "Done" state
  • Restart: if the session has a process, the process is terminated. A new process is started and the session is put into the running state.
  • Detach: if the session is in a paused or running state, this makes the session forget about the process, and puts it into the "detached" state.
  • Reattach: if the session is in a detached state, attaches to the process.
  • Kill and Destroy: Destroys the session, and kills the debugee.
  • Detach and Destroy: Destroys the session and detaches from the debugee.

Contextual Menu

The contextual menu for a session should look like the following (where actions not supported by the debugger type should not be show):

Make Current
--------
Pause
Continue
--------
Restart
Detach
Kill
Finish
--------
List Options
--------
Properties

If multiple sessions are selected, the "Make Current" item must be unavailable (disabled). If multiple sessions are selected, then only the items which apply to all of them should be made available (e.g. if there are two sessions, and one is paused and one is running, and both are selected, then neither the pause nor continue item should be available).

Specific Debugging Engine Details

This section details some information about specific debugger types.

Java2 Debugger

Name Column

The name of the session is the non-qualified class name. A tooltip for this column should always show the fully qualified name. [tooltip doesn't show this in 3.4]

Additional States

  • Paused: This indicates that the process was paused by the user choosing the "Pause" command.
  • On Breakpoint: Like Paused, but indicates that the session was paused because a breakpoint fired.
  • Starting: the debugee is starting, but can't yet be paused
  • Stopped: shown, I think, while one is stepping

Additional Columns

  • Hostname: The name of the host the process is running on
  • Port: The port that the debugger is connected through [Not in 3.4]
  • Classname: the fully qualified class name [Not in 3.4]

Additional Actions

[none of these are supported in 3.4]

The debugger may support the following actions:

  • Restart: if the session has a process, the process is terminated. A new process is started and the session is put into the running state.
  • Detach: if the session is in a paused or running state, this makes the session forget about the process, and puts it into the "detached" state.
  • Reattach: if the session is in a detached state, attaches to the process.
  • Kill and Destroy: Destroys the session, and kills the debugee.
  • Detach and Destroy: Destroys the session and detaches from the debugee.

 

Project Features

About this Project

ui was started in November 2009, is owned by Jiří Kovalský, and has 37 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close