CSE 490c/303 Homework 6 FAQ

Last Updated: Saturday 11/22/03, 10:14

Q/A2.
11/26/2003 15:36 - A new capplet.sh file is available (that fixes a problem that results in the compiler either finding no files to compile or else having trouble finding other system files) is now available. The problems it fixes are related to running without administrative privileges, so you do not need it if you know you are running as administrator (e.g., you might be on a personal machine).

The file is here.

Q1.
I installed everything as described on the website. I modified and built my code for plugin one, but when I choose start in Visual Studio it says mozilla contains no debugging information. It launches mozilla and never runs my plugin. What can I do. Is there a specific url I am supposed to go to or is it supposed to launch automatically.
A1.
Everything you described is normal behavior. Here's what's going on, which will explain how to get your code run.

Mozilla comes up. It looks in a few directories for files that might be plugins. The MOZ_PLUGIN_PATH environment variable tells it to look in the directory from the install, and into which VS writes whenever you build.

When Mozilla finds a plugin (which is a .dll file), it looks at it just enough to figure out what kind of data the plugin claims it will handle. These types are called MIME types. The two MIME types your plugins handle are application/hw6Q1ans-plugin and application/hw6Q2ans-plugin. If you select the Help/About Plugins menu item in Mozilla you'll see them listed.

The plugins (i.e., your code) isn’t actually loaded into memory until Mozilla loads a web page with content that includes the corresponding MIME type. The files q1.html and q2.html in the testfiles directory from the install have these.

So, to run your code, you have to load some page that calls for it, like those test files.

Finally, I've set up the Visual Studio projects to launch Mozilla when you hit start. VS wants to find the "symbol table" for the code it loads – a table that gives the memory addresses at which the variables in the code have been loaded, where the methods are, etc. Mozilla wasn't compiled to include the symbol table, so VS says it can't find it. That'd be a problem if you were debugging Mozilla, but you're not.

When you fetch a web page that causes your code to be loaded, VS WILL find the symbol table for your code (because we've set the VS project up to produce a DLL that includes the symbol table). You'll be able to set breakpoints in your own code, and look at variable values.