Changes

Jump to: navigation, search

Dive into Mozilla Debugging Mozilla Lab

254 bytes added, 09:51, 7 March 2007
C++ with Visual Studio.NET 2005
* In VS.NET, click '''File > Open > Project/Solution....''' Navigate to your debug-built firefox.exe, perhaps in '''mozilla/objdir/dist/bin'''. This will create a '''Solution File (.sln)''' in the same directory as firefox.exe.
* Now right-click firefox.exe in '''Solution Explorer''' and add '''MOZ_NO_REMOTEXPCOM_DEBUG_BREAK=1warn''' to the list of '''Environment variables'''. Next, add the following to the '''Command Arguments''' list: '''-p ''development'' --no-remote''' where ''development'' is the name of a profile you've created for testing (NOTE: use -Profilemanager if you haven't done this yet, and create one).
* Open a source file ('''File > Open > File...'''), for example, '''mozilla/widget/src/windows/nsWindow.cpp''', and set a breakpoint. You do this by clicking to the left of the line numbers--you should see a '''red circle'''. For example, you could set a breakpoint on the [http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsWindow.cpp#5253 mouse scrollwheel code] at '''line 5261''' to see when it gets executed and how it works:

Navigation menu