Open main menu

CDOT Wiki β

Changes

Dive into Mozilla Debugging Mozilla Lab

No change in size, 11:28, 1 March 2007
C++ with Visual Studio.NET 2005
* Now right-click firefox.exe in '''Solution Explorer''' and add '''MOZ_NO_REMOTE=1''' to the list of '''Environment variables'''.
* 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 52565261''' to see when it gets executed and how it works:
4289 PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *aRetValue)
5254 #ifndef WINCE
5255 if (msg == WM_MOUSEWHEEL || msg == WM_MOUSEHWHEEL) {
'''5256 static int iDeltaPerLine, iDeltaPerChar;''' <-- breakpoint here
5257 static ULONG ulScrollLines, ulScrollChars = 1;
5258 static int currentVDelta, currentHDelta;
5259 static HWND currentWindow = 0;
5260
5261 '''PRBool isVertical = msg == WM_MOUSEWHEEL;''' <-- breakpoint here
...