Next: , Previous: About Kite, Up: Top


2 Invoking Kite

2.1 Normal invocation

To see what command line arguments are available, use the -h flag. It will produce something similar to the following:

     harry:trunk mooneer$ kite -h
     This is kite, version 1.0a1 (built on i386-apple-darwin9.1.0)
     Copyright (C) 2007 Mooneer Salem
     
     Usage: kite [-h|-v] [file]
           -v: Print version information
           -h: This message
       [file]: File to execute or run (optional). If not specified, defaults to
               standard input.

To run a Kite application, simply include the filename as an argument:

     harry:trunk mooneer$ kite test.kt
     Hello, world!
     harry:trunk mooneer$

Not including a filename will cause Kite to take the program from standard input:

     harry:trunk mooneer$ kite
     "Hello, world!"|print()
     ^D
     Hello, world!
     harry:trunk mooneer$

2.2 The Kite Debugger (kdb)

Kite has a built-in debugger for user-written code, called kdb. To execute it, pass kdb the name of your program:

     harry:trunk mooneer$ kdb test.kt
     Break at file test.kt
     1: "Hello, world!"|print;
     >

2.2.1 Available commands

While in kdb, the following commands are available:

eval [code]
Compiles the given code and evaluates it in the current context. The return value is output to standard output.
exit
Exits the application.
clear [file]:[line]
Clears breakpoint at the file [file] line [line].
break [file]:[line]
Sets breakpoint at the file [file] line [line].
step
Steps through one line of code.
next
Steps through one line of code, executing any methods called by the current line.
cont
Continues execution until the next breakpoint.
ev [code]
Synonym for eval.
ex
Synonym for exit.
cl [file]:[line]
Synonym for clear.
b [file]:[line]
Synonym for break.
s
Synonym for step.
n
Synonym for next.
co
Synonym for cont.