TS 68 JavaFX Debugger

Debugger

Author: Alexandr Scherbatiy
Version: 1.1
Last update: 25 September 2009
Introduction:
Comments:


Contents



Debugger Ubrella issue: -

What Issues
Project
Breakpoints
Variables 172163,173181,173183
File renaming 173182,173184
Step Into
Step Out 173186
Step Over
Step Over Expression
Continue
Variables
Name 172458
Type 172456,172460,172456
Value 172455
Watches 173177
Name 173082
Type 173085
Value 173083
Call Stack 173179




Project

  1. Debug Project
    1. Create a JavaFX Script project.
    2. Press Debug Main Project button
    3. Press Finish Debugger Session button.
    • EXPECTED RESULT: Debugger should start.
    • EXPECTED RESULT: Debugger should stop.



Breakpoints

  1. Set Breakpoints
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
               
      
var a = 10; var b = 20.5; var c = a + b;
    1. Set breakpoints (click on the Glyph Gutter in the editor) for a, b and c variables
    2. Debug the project (press <Ctrl+F5>).
    3. Continue debug the project (press <F5>) for each variable.
    • EXPECTED RESULT: Debugger should stop on each breakpoint.
    • EXPECTED RESULT: Debugger should stop after end of the project.
  1. Add new line before a breakpoint
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
               
      
var a = 10;
    1. Set breakpoints (click on the Glyph Gutter in the editor) to a variable
    2. Debug the project (press <Ctrl+F5>).
    3. Finish debuger
    4. Add a new line before the a variable
// new line var a = 10;
    1. Debug the project (press <Ctrl+F5>).
    • EXPECTED RESULT: Debugger should stop on the breakpoint.
  1. Step Into
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
function a (){ println("a"); } function b(){ a(); } b();
    1. Set a breakpoint for the b() call on the last line
    2. Debug the project (press <Ctrl+F5>).
    3. Press Step Into button (press <F7>) on the toollbar.
    • EXPECTED RESULT: The green line should point to the b function body.
  1. Step Out
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
function a (){ println("a"); } function b(){ a(); } b();
    1. Set a breakpoint for the b() call on the last line
    2. Debug the project (press <Ctrl+F5>).
    3. Press Step Into button (press <F7>) on the toollbar.
    4. Press Step Out button (press <Ctrl+F7>) on the toollbar.
    • EXPECTED RESULT: The green line should point to the b() call on the last line not the a function body.




Watches

  1. Watches Window
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
var a = 10; var b = 20.5; var c = a + b; print(c);
    1. Set breakpoints for print(c); line
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Watches window.
    4. Right-click and select New Watch...
    5. Type a + 10 for the watch expression.
    6. Right-click and select New Watch...
    7. Type c * 2 for the watch expression.
    • EXPECTED RESULT: There should be 20 value for the a + 10 expression.
    • EXPECTED RESULT: There should be 61.0 value for the c * 2 expression.




Variables

  1. Variables Window
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
var i = 3; var num = 3.0; var b = true; var c = "2".charAt(0); var byte:Byte = 1; var short:Short = 2; var long:Long = 3; var float:Float = 5.0; var double:Double = 10.0; var date = 3h; var void = function():Void{}; var str = "Hello!"; class A{} var a = A{}; var f = function(a:Number, b:String):Boolean { true }; var seqf = function(a:A[[ | ]], b:String[[ | ]]):Boolean[[ | ]] { [] }; var seq = ["1","2","3" ]; println("");
    1. Set a breakpoint for last line
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Variables window.
    • EXPECTED RESULT: Each variable should be shown in the Variables window
    • EXPECTED RESULT: Each variable should have the type and the default value
    • For example: There should be i



Breakpoints Window

  1. Breakpoints Window
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
var a = 10; var b = 20.5; var c = a + b;
    1. Set breakpoints for a, b and c variables
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Breakpoints window
    • EXPECTED RESULT: The Breakpoints window should show the set berakpoints



Call Stack Window

  1. Call Stack
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
               
      
var a = 10; var b = 20.5; var c = a + b;
    1. Set breakpoints for a, b and c variables
    2. Debug the project (press <Ctrl+F5>).
    3. Go to the Call Stack window
    • EXPECTED RESULT: The current program call stack should be shown.




Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo