Opera Dragonfly
Opera Dragonfly is a set of developer tools, with features like:
- JavaScript debugger
- DOM inspector
- CSS inspector
- Command line to input and execute JavaScript commands
- Error console for CSS and JavaScript validation errors and warnings
- Proxy to allow debugging directly on devices
Opera Dragonfly is designed to allow debugging directly on a desktop computer as well as on other devices by using the remote debug feature. By using this feature, web pages and web application displayed on a device can easily be be debugged from a regular desktop computer.
Remote debugging using opera:debug
In order to debug applications running inside the CDK you will have to use
remote debugging. To run remote debugging you need two things, a copy of Opera Desktop
with support for Opera Dragonfly, and the CDK. Remote debugging can be started
by following the step by step instruction below.
(Note: depending on which version of Opera Desktop you are using, location of menu
and settings can be slightly different)
- Start up Opera Desktop and open Opera Dragonfly by clicking at "Tools > Advanced > Opera Dragonfly"
- Click on the "Settings" tab in the Opera Dragonfly window, check the "Remote Debug" check box, and click the "Apply" button.
- If a dialog is displayed in Opera Desktop that says "Opera Dragonfly is waiting for a connection on port 7001", click OK.
- Start up the CDK and open the opera:debug URL or select "Debug>Dragonfly (Remote)"
- Enter the IP address of the computer Opera Desktop runs on, click the "Connect" button and select OK in the dialog.
- If a dialog is displayed in Opera Desktop that says "Try to load a compatible version?", click OK and press the "Connect" button one more time on the opera:debug page to reconnect.
- If a dialog is displayed in Opera Desktop that says "Service is not available: exec", click OK.
If all went well, you should now be able to open a URL on the device and debug it in Opera Dragonfly on Opera Desktop.
If you have problems opening opera:debug make sure you haven't disabled it by mistake. In fact opera:debug URL can be blocked using urlfilter.ini configuration file located in OPERA_HOME directory. Information about how to create a urlfilter.ini file can be found in the URL filtering documentation.
Security issues
It is important to be aware of that setting up a connection for remote debugging with Opera Dragonfly is a potential security issue, since is gives unrestricted access to the entire browser session.
In a walled garden environment for example, Opera Dragonfly might be a useful tool during the development phase. Opera Dragonfly exposes the entire DOM environment and can for example be used to temporary alter the JavaScript code and DOM tree on the page you are currently examining.
Resources
For further information about how to use Opera Dragonfly, please have a look at the following articles and pages:
- Opera Dragonfly documentation
- Introduction to Opera Dragonfly
- Remote debugging with Opera Dragonfly
- Opera Dragonfly Architecture
Please note that this information describes how remote debugging is done when running a Windows Mobile phone, so some differences to how it is working in the CDK builds are expected.