Debugging Basic Acceptance Tests

From Aptana Development

Contents

General

  1. Check to make sure that Firefox profile is created by default on first run of the IDE. Delete the profile and it should be recreated.
  2. Remove any existing Aptana/Firebug extension in Firefox. Restart it and close(required).
  3. Open a project file (e.g. debug_tests.html), launch the debugger the first time and accept Aptana Debugger installation.
  4. Go through the set of tests in debug_tests.html to verify stepping, breakpoints, console output and variables.

Breakpoints

  1. Open the launch configuration and go through Breakpoints test in combination with the following options:
    1. Non-project file + current page option
    2. Current page - a file opened in the current page editor should be opened
    3. Specific page - click Browse and select debug_tests.html file
    4. Use external web server + current page
    5. Use external web server + specific page
    6. Use external web server + start URL (Start URL should be a subpath of external web server base URL to get breakpoints working)
  2. Open Breakpoint Properties dialog
    1. set hit count
    2. set condition text
    3. mark breakpoint disabled
  3. Open a new HTML FIle
  4. Add a <script> tag with the following content

   var j = 3;
   function evaled(j) {
       j += j;
       j *= j;
   }
   eval("evaled(j)");

  1. Set a breakpoint at the eval line
  2. Debug this file
  3. When the breakpoint it hit select Step Into
    1. Ensure the evaled function is stepped into
  4. Step over evaled function
  5. Ensure j is updated in the Variables view

Views

Debug

  • verify debug actions are available during debugging
  • select different stack frame elements in the debug tree

Console

  • check debug messages are displayed
  • click on hyperlinks on console

Variables

  • navigate variables tree when script execution is suspended
  • use Change value... to modify variables
  • define a new detail formatter, see values in details pane

Expressions

  • create a new watch expression
  • define a new watch expression from Variables view on selected variable [works for scope and this variables only, for now]
  • change a variable value

Scripts

  • select script elements to navigate to source code

Ajax Monitor

  1. select "JS Debugger" in Debug view
  2. run XMLHttpRequest sniffing test and see results in the view
  3. selectBody/Headers tabs

Links