Aptana Studio ヘルプ > はじめに > Aptana Studioのデバッガを使用してJavaScriptをデバッグ > デバッグパースペクティブ

変数ビューの使用方法

このページでは、Aptanaのデバッグパースペクティブの一部である変数ビューを使用する方法について説明します。

目次

概要

変数ビュー(下図参照)を使用します。現在のスタックフレーム変数とその値が表示されます。

Image:variablesView.png

手順

This section explains how to perform common tasks for working with the Variables View.

Displaying the variables for a stack frame

To display the variables for a stack frame:

  1. Start the debugger and switch to the Aptana Debug perspective. (See Running the debugger if you need help.)
  2. Suspend the current JavaScript thread.
    1. In the Debug View, select the thread that you want to suspend.
    2. Click the Suspend button Image:iconSuspend.png to suspend the JavaScript code on the first executed line. While the thread is suspended, your web browser user interface will be completely disabled.
  3. In the Debug View, expand Thread and select the stack frame that you want to view the variables for.
  4. Click the Variables View tab to display the variables for the stack frame that you selected.

Aptana displays the variables for the stack frame in the Variables View.

Displaying variable types

To display variable types for the variables displayed in the Variables View, click the Show Type Names button Image:iconShowTypeNames.png.

Aptana displays the type names for the variables in the current stack.

Changing the value of a variable

To change the value of a variable:

  1. Follow the instructions above for displaying the variables for a stack frame to display the variable that you want to change the value for.
  2. On the Variables View, right-click the variable that you want to change, and select Change Value... from the context menu to open a Set Value pop-up window.
  3. On the Set Value pop-up window, type the new value for your variable.
  4. Click OK to set the new value of the variable.

Related Topics