Using_the_Mozilla_symbol_server is now even more feature-packed. The nightly debug builds are now also Source Indexed so that by following a couple of simple steps you can also have the source code served to you for debugging without a local build.
What you'll need
- Visual Studio (this documentation was created with 2005)
- A nightly build that was created after April 9, 2008 - go to the .../firefox/nightly/latest-trunk/ folder and grab the installer
- cvs.exe, added to your PATH (the cvs.exe from MozillaBuild has problems, use this one instead.)
Set up Symbols
Follow the instructions for Using_the_Mozilla_symbol_server. Once the symbol path is set you must now enable Source Server.
Enable Source Server in Visual Studio
Create a srcsrv.ini
This file needs to be located in the same folder as srcsrv.dll and devenv.exe -- for example C:\Program Files\Microsoft Visual Studio 8\Common7\IDE -- this file needs only one variable set up in order to work:
What this does is to override the cvs path that is embedded into the pdb files when they are created and instead makes sure that you will be able to download the files through cvs.
How to use Source Server
Open Visual Studio and select File -> Open -> Project/Solution. In the dialog box that appears set the type to "Executable File" and then navigate to the Minefield folder and open firefox.exe
Symbols will load and then when you try to step into or step over a confirmation window will appear asking if you trust the cvs command that Source Server is trying to run.
You will have to say "Run" for each source file unless you override this in your srcsrv.ini file by using Trusted Command:
[trusted commands] cvs.exe=PATH\cvs.exe
The trickiest part of the source server as it stands right now is helping Visual Studio locate the code it downloads. By default Visual Studio looks in C:\Documents and Settings\Username\Local Settings\Application Data\SourceServer - at the time of writing this, the code might be checked out into your C:\Program Files\Microsoft Visual Studio\Common7\IDE folder and if you copy it to the default folder then Visual Studio should be able to locate it and you're on your way to having code to look at when debugging.