Changes between Initial Version and Version 1 of Drosera


Ignore:
Timestamp:
Nov 14, 2006, 7:12:01 PM (18 years ago)
Author:
pewtermoose@gmail.com
Comment:

Some rough Drosera documentation

Legend:

Unmodified
Added
Removed
Modified
  • Drosera

    v1 v1  
     1[[PageOutline]]
     2= About Drosera =
     3Drosera is a JavaScript debugger for WebKit that can be used with any application that uses WebKit.  Like the Web Inspector, over 90% of it is written in HTML, CSS and JavaScript.
     4
     5= Getting Drosera =
     6Drosera is included with all of the [wiki:"Nightly Builds" WebKit nightly builds], or you can build it yourself by running the {{{build-drosera}}} tool found in {{{WebKitTools/Scripts}}}.
     7
     8If you use a locally built version of WebKit, you'll need to run the following command in Terminal and restart Safari to enable Drosera debugging:
     9{{{
     10defaults write com.apple.Safari WebKitScriptDebuggerEnabled -bool true
     11}}}
     12
     13= Using Drosera =
     14Now that you have Drosera, you'll need something to debug.  Although Drosera can be used with any application that links against WebKit, it needs to be launched with the current development frameworks.  If you're debugging a website in Safari, you do not need to worry about this as long as you're using one of the [wiki:"Nightly Builds" nightly builds].  If you're debugging your own application however, you'll need to make sure the {{{WebKitScriptDebuggerEnabled}}} key is in your bundle identifier and then use the {{{run-webkit-app}}} script located in {{{WebKitTools/Scripts}}} to start your application.
     15
     16Once Drosera is launched, you're presented with the Attach window, showing all running applications capable of being debugged with Drosera.  Select the application you want to debug to load the debugging window.
     17
     18== Breakpoints ==
     19Double clicking a line number in the editor window sets a new breakpoint.  To delete a breakpoint, simply drag the breakpoint arrow from the line number.
     20
     21The breakpoint popup allows you to enable/disable the breakpoint, view how many times the code path has been reached, and whether to pause code execution or log output to the console when the breakpoint is reached.  When pause is selected, you may enter JavaScript to be evaluated for conditional breaking, while log mode will evaluate any JavaScript and log its output to the console.
     22
     23== Console ==
     24Drosera's console is similiar to the JavaScript console in the Safari debug menu and shows the same errors and warnings.  Breakpoints set to log mode allow output to be displayed in the console, and while a script is paused, JavaScript can be executed directly in the console.
     25
     26== Function and Variable Stacks ==
     27While a script is paused, you can examine the contents of the variables within various scopes of the code.