mozilla

Revision 128905 of Using the Mozilla source server

  • Revision slug: Using_the_Mozilla_source_server
  • Revision title: Using the Mozilla source server
  • Revision id: 128905
  • Created:
  • Creator: CF
  • Is current revision? No
  • Comment /* What you'll need */

Revision Content

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)

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

Image:enableSourceServer.png

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:

[variables]

MYSERVER=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

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

Image:openExecutable.png

Start Debugging

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.

Image:cvsMessage.png

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.

Image:firefoxDebugging.png

Revision Source

<p><a href="en/Using_the_Mozilla_symbol_server">Using_the_Mozilla_symbol_server</a> 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.
</p>
<h4 name="What_you.27ll_need"> What you'll need </h4>
<ul><li> Visual Studio (this documentation was created with 2005)
</li><li> A nightly build that was created after April 9, 2008 - go to the <a class="external" href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">.../firefox/nightly/latest-trunk/</a> folder and grab the installer
</li><li> cvs.exe (added to your PATH)
</li></ul>
<h3 name="Set_up_Symbols"> Set up Symbols </h3>
<p>Follow the instructions for <a href="en/Using_the_Mozilla_symbol_server">Using_the_Mozilla_symbol_server</a>.  Once the symbol path is set you must now enable Source Server.
</p>
<h3 name="Enable_Source_Server_in_Visual_Studio"> Enable Source Server in Visual Studio </h3>
<p><img alt="Image:enableSourceServer.png" src="File:en/Media_Gallery/EnableSourceServer.png">
</p>
<h3 name="Create_a_srcsrv.ini"> Create a srcsrv.ini </h3>
<p>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:
</p>
<pre>[variables]

MYSERVER=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
</pre>
<p>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.
</p>
<h3 name="How_to_use_Source_Server"> How to use Source Server </h3>
<p>Open Visual Studio and select File -&gt; Open -&gt; 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
</p><p><img alt="Image:openExecutable.png" src="File:en/Media_Gallery/OpenExecutable.png">
</p>
<h4 name="Start_Debugging"> Start Debugging </h4>
<p>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.  
</p><p><img alt="Image:cvsMessage.png" src="File:en/Media_Gallery/CvsMessage.png">
</p><p>You will have to say "Run" for each source file unless you override this in your srcsrv.ini file by using Trusted Command:
</p>
<pre>[trusted commands]
cvs.exe=PATH\cvs.exe
</pre>
<p>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.
</p><p><img alt="Image:firefoxDebugging.png" src="File:en/Media_Gallery/FirefoxDebugging.png">
</p>
Revert to this revision