Learning to debug – Part 1

So, I’m trying to hook up the Mozilla Symbol Server in order to better see how my attempts at knitting a source server to it will work.

First – I need to know what version of Firefox I should be doing this with. Currently I have 3 options: ff2, nightly build and my own build from yesterday’s class. Talking with Dave on IRC, it seems like the nightly is the one to go with.

Now I need a sure-fire browser crashing bug. A few attempts at finding simple-seeming bugs in mxr is fruitless. I try a Gmail bug, the printer bug – no crash. Then bsmedberg provides me with this.

So, with my visual studio 2005 attached to the process that is Minefield, I install the toxic extension and restart Minefield – “Crash Bang Boom!” (i love this, btw). So now I can see some stuff in Visual Studio. What I’m looking at, I’m not exactly sure yet.

Then I did something and cleared out the results of the crash and now I can’t get them back because Minefield crashes too fast for me to attach to process in VStudio. Bsmedberg gave me the following commands to try and get it back:
set env NO_EM_RESTART=1
devenv -debugexe firefox.exe -P test

I’m fiddling with this as we speak.

Stay tuned for part 2 where I hopefully will start to see the use of symbols.

Heading to 0.1

Today has been a blow-out day of looking at other people’s code. First in class we explored mxr and tried to follow simple browser functions back to their origins. In looking up where the code for the “Clear Private Data” option was, I discovered that I can choose between being asked to confirm before clearing or not. I personally will choose not because I hate the additional click of confirming.

Following the one hour bike ride home and the dog walk to and from the library I sat down to read Chapter 11 of Diomidis Spinellis, Code Reading: The Open Source Perspective
. I liked the simplicity of his example. While I followed his trajectory through adapting a large source code base I picked up on some great ways to avoid trying to master the entire source and instead poke away at what you want to accomplish.

So I need to apply this to what a 0.1 release of my project will look like.

I looked briefly at the source code for the symbol server. There are several references to code on my project page.

Two things that are missing for me:
1. Seeing a debug in action so that I can get a visual reference for how the symbols work with the debugger.
2. Learning how to add to the existing code so that I can test whether my changes will work.

I’m going to continue looking at resources that cover how to debug in windows and see if I can make some headway. If anyone is interested in giving me a demo of how they debug in windows using the symbol server, I would appreciate that.

Running 2 versions of Firefox

In IRC chat the other day I asked how often Ted (aka luser) did builds and he said not that often – pointing me instead to the nightly builds saying that he used these instead since they were updated automatically every day.

So I downloaded one and installed it.

Now, my favourite extension is the foxmarks synchronizer app because I find myself travelling between my desktop Mac at home and my PC laptop, as well I will often work at jobs where there’s a need for a third foxmarks setup.

This extension doesn’t work for 3.0 yet – so I’ve currently been opening the command window and opening each version with the -Profilemanager so that I can use my default profile for 2.0 (with foxmarks) and my “nightlyBuilds” profile for exploring 3.0

Now I read in a post that I can just manually change the version. Sounds great, but I don’t know if I want to go through this everytime there’s a new nightly version number.

Anyone else know a better way?