While debugging Mozilla Firefox either you can create a debug .exe using mozilla build or you can generate a visual studio solution (.sln). In the first case you cannot browse through the code while in the second you can.
Debug Build from Mozilla Build
- If you want to debug mozilla in VS2012, compile it in debug mode. Add the following lines to mozilla-release\mozconfig
12ac_add_options --enable-debugac_add_options --disable-optimize
- After that create firefox.exe
12cd mozilla-release./mach build
- Create a new solution in VS2012 adding the newly created mozilla-release\obj-i686-pc-mingw32\dist\bin\firefox.exe
- Open any source file that you believe will definitely run. Mark a break point.
- Right click on firefox in Solution Explorer and click Debug > Step Into new instance
A Better Approach
The approach has a problem. You cannot browse through the code. If you want to do that
- Create a VisualStudio solution
123cd mozilla-release./mach configure./mach build-backend -b VisualStudio
- It will create a VS solution in \mozilla-release\obj-i686-pc-mingw32\msvc\mozilla,sln
- Open it in VS2012. It may update the solution to latest format.
- That’t it.