Changes

Jump to: navigation, search

Debug Mode Firefox 1.5

746 bytes added, 23:23, 20 October 2006
Instructions
This will start the Open Project Dialog and you should navigate to your firefox.exe directory, for me it is:
<pre>C:\proj\mozilla\hopefullyWorked.firefox.optimized\dist\bin</pre>
[[Image:Yshen6_openProject.JPG]]]]<br/><br/><br/>
Visual Studio will create a Solution File (.sln) in the same directory as firefox.exe and give you the Solution Explorer<br/><br/><br/>
[[Image:Yshen6_projectSolution.JPG]]<br/><br/><br/>
Now we are ready to set a breakpoint in a source file so we can stop Firefox and inspect it running at the appropriate point. Open a source file
<pre>File > Open > File...</pre>
For example a To find the file that related to your project you need search the keyword at http://lxr.mozilla.org. First you need specify which version of Firefox your working on then do a search for the keyword, for example for our project "Canvas" which Canvas Rendering 2D /3D Objecton the screen.<br/><br/><br/>[[Image:Yshen6_searchCanvas.JPG]]<br/><br/><br/>There are hundreds of lines that in different files related to Canvas, then we need read some commons or go in to code to specify which file we need, for our project is: nsCanvasRenderingContext2D.cpp, then we need go back to our source files and open it:
<pre>C:\proj\mozilla\content\canvas\src\nsCanvasRenderingContext2D.cpp</pre>
Then locate a line for your breakpoint and click to the left of the line number in the gray selection border then it set a red circle:<br/><br/><br/>
== Conclusion ==
To run Firefox in debug mode by Visual Studio does not take very long time and it is not as hard as build it in Windows, but it require you know where to find the project file and find the file that related to your project.
1
edit

Navigation menu