|Mailing List • Forums • IRC • mattermost|
|Open • Help Wanted • Bug Day|
|Browse Source • Project Set File|
The bundles provided by JSDT debug for the Rhino support include:
org.eclipse.wst.jsdt.debug.rhino- the core Rhino implementation, provides the Rhino-specific implementation of JSDI
org.eclipse.wst.jsdt.debug.rhino.ui- the Rhino-specific user interface bits
org.eclipse.wst.jsdt.debug.rhino.debugger- the Rhino debugger that can be embedded in a server for remote debugging
Local Rhino Debugging
The related New and Noteworthy entry is here.
The options on the Main tab allow you to specify the script you want to debug and the parameters use to configure the Rhino interpreter. The default options specified for a new configuration will provide you with the most general debugging experience, but you can tailor how the interpreter runs to reproduce specific scenarios.
There are a few options for Rhino which are as follows:
Rhino optimization level : Rhino can make certain optimizations when it interprets the script. To find out more about what each optimization means / does check this link.
Strict mode : This option puts Rhino in strict mode. When in strict mode Rhino will treat some warnings as errors and will report all warnings. It can be a challenge to debug scripts in strict mode, as many more problems are found, most of which terminate interpreting the script.
Log interpreter exceptions : In certain cases, usually a fatal problem from the interpreter, exceptions will be thrown from Rhino. This option allows them to be forwarded to the Eclipse error log.
The Include tab for a Rhino configuration allows you to quickly and easily add additional scripts to be run before the main script.
You have the option to add one or more scripts from the workspace or from the local or extended file system.
Using the Up and Down buttons you can place the scripts in the order you would like them to be run. The script at the top of the listing will be run first. You can also use the Remove button to remove the selected included scripts from the listing.
Any scripts that are added to the include path also have their containing folder automatically added to the source lookup path. For example if you added the script
/home/user/myscript.js to the include path, the folder entry for
/home/user/ would be added to the source lookup path for you automatically.
The Source tab allows you to customize where the launch will look for your source. This tab is automatically updated to track the script specified on the Main tab as well as entries on the Include tab.
Any automatically added entries can be changed / removed as you like and and new entries can be added from one of the following locations:
- External Archive
- File System Directory
- Java Classpath Variable
- Java Library
- Java Project
- Working Set
- Workspace Folder
To modify the source lookup path simply use the Add..., Remove... or Edit... buttons. The
Default project source lookup entry cannot be modified, as it it directly tied to the script specified on the Main tab. But you can modify and edit any child entries of the
Default project entry.
Embedding the Rhino Debugger
One of the more powerful usages of the Rhino debug support is that it can easily be embedded into your existing server. Embedding the Rhino Debugger allows you to remotely debug the loading and execution of scripts from the Eclipse IDE.
To learn how to embed the Rhino Debugger please go to this page.
Rhino Debug Wire Protocol
To provide support for the Rhino interpreter, we had to create both sides of the coin - the debugger and the client. To facilitate communication between the debugger and the client we created an adapted version of v8 (JSON-based) packet communication.