How do I debug my application using global variables?

You can debug your application using the variables outside of the current thread or stackframe by adding global variables from the Variables view.

To add a global variable:

  1. Start a debugging session.
  2. The IDE switches to the Debug perspective.
  3. Click the Add Global Variables button from the Variables view toolbar. Alternatively, right-click in the Variables view and select Add Global Variables option from the context menu.

    The Add Globals dialog box appears listing all global variables present in your application.

    Tip: Select Window > Show View > Variables from the IDE menu bar to open the Variables view.
    Figure 1. Add Globals Dialog Box

    Add Globals Dialog Box

  4. Enter the variable name in the text box, or you can enter a filter string and select the desired variable from the Matching items list.
  5. Click OK .

The selected variable appears in the Variables view.