$Id$
We'll use the console logger as the example application, because it's simplest.
You need to have the scope module in your module set (don't forget modules/readme.txt).
Enable FEATURE_SCOPE and all the scope features you want, for this example you want at least FEATURE_SCOPE_CONSOLE_LOGGER.
Recompile Opera.
You can find the precompiled tools in CVS in module scope under dist. If they work for you, read no further here.
Tools: Currently the development environment is Netbeans 5.0. (Older versions won't do.) If you don't have it, get it from http://www.netbeans.info/downloads/. Install it.
Open projects: You need to open two projects in Netbeans. From "File | Open Project ..." open the following projects in the scope module:
While opening these you'll probably be asked whether to open the dependent projects clients/clientlib and clients/httpd. Answer "yes". (Otherwise open them manually.)
Compile the proxy: In the projects pane, right-click "proxy" and select "Build project". This creates modules/scope/proxy/dist/proxy.jar.
Compile the console-logger: In the projects pane, right-click "console-logger" and select "Build project". This creates both the clientlib jar file and the console-logger jar file. Note: The output pane in Netbeans will contain the command line you will use to run the logger.
Your opera.ini file contains information about where Opera will
find the proxy. In the section "[Developer Tools]" you can set
the variable "Proxy Host" to the dotted IP address of the proxy
host (the default is localhost, 127.0.0.1) and the variable
"Proxy Port" to the port number (the default is 7001). E.g.
the opera.ini file should contain something like:
[Developer Tools] Proxy Host=127.0.0.1 Proxy Port=7001 Proxy Auto Connect=1
The option "Proxy Auto Connect" will enable automatically connecting to the proxy on startup. Because of security risks, this will only happen if the host is localhost. To connect manually, go to the URL opera:debug and click "Connect". This also works for remote hosts.
Script debugging needs to be compiled in if you want to perform Ecmascript debugging or DOM/CSS-inspection.
You need to create two shell windows.
The proxy must be started first, so cd to modules/scope/proxy in one shell and type "java -jar dist/proxy.jar" to start the proxy.
In another shell, cd to modules/scope/client/console-logger and paste in the command line Netbeans gave you.
Finally start Opera. You should see a little logging output in the proxy window, and once you go to a page in Opera that generates console messages, you should see them appear in the console window.
You can now quit Opera or the console logger; the proxy stays up until you kill it and can be reused (though it sometimes becomes wedged and needs to be restarted).
The debug module will log debug messages to the console, and therefore to the logger, if you enable it. In your Opera directory create a file called debug.txt with the following contents:
debugging=on console=on *
(The key "*" says to log all debug messages; replace this with selected debugging keywords if you like. Try "gogifont".)
For the HTTP logger and URL player you also need the following projects:
They're compiled like the console logger was compiled.