This article shows you how to debug widgets running on your mobile phone. For some background, take a look at the following articles:
In essence, you need to run an instance of Opera Dragonfly (inside your desktop browser) then configure the Widget manager on the device to communicate with this instance. You can then view, stop and step into code in widgets running on the device from the desktop instance.
First of all, configure Opera Dragonfly to accept remote debugging connections and which port to use, as described in the article on remote debugging.
The S60 and Windows Mobile Widget manager application is a separate application from the Opera Mobile browser, which means that the manager and the browser don’t share settings directly. To debug widgets run from the Widget manager, you need to configure access to Opera Dragonfly in a dialog in the manager. In this dialog, you set the IP and port of the desktop computer the device should connect to.
If using Windows, you may need to open the port in your Windows Firewall.
Both the desktop computer and the device must be connected to the same WLAN to be able to connect.
Open the left soft key menu and choose the Dragonfly option. This will open the dialog for configuring access to the debugger (see Figure 1). Into the dialog, enter the IP address of the desktop computer and the port you configured in the desktop instance, and hit “Connect”.
Figure 1: Configuring Opera Dragonfly on S60
Opera Dragonfly is available on Windows Mobile as the last widget in the manager. Open this “widget” to configure Dragonfly (see Figure 2). Enter the IP of the desktop computer and the port you configured in the desktop instance and hit “Connect”.
Figure 2: Configuring Opera Dragonfly on Windows Mobile
Once you’ve configured your instances, you should get a message confirming you are connected. Run the widget you want to debug from the Widget manager on the device, then find your widget in the drop-down box in your Opera Dragonfly instance on the desktop and get debugging!