Good point, I think I'll bug myself to write something up unless someone 
beats me to it.

Anyway, to debug on Win32 you need Visual C++ environment, the same 
thing you used to build the thing.

There are basically several ways to get started, but here is at least 
one way:

1. In MSDEV, File > Open Workspace... 
mozilla/dist/win32_d.obj/bin/mozilla.exe

2. Project > Settings > Debug > Category: Additional DLLs and add the 
DLLs you want to debug (or all if you like). They are in the same 
directory as mozilla.exe and the components directory under it. This 
step is not necessary but you need to do this if you want to be able to
place breakpoints into files whose DLL has not yet been loaded.

Then you just debug the program as you'd normally do with any other 
program (F5 to run, F9 to set/unset breakpoint etc.).

Additionally you might want to make it easier to debug Unicode strings
and customize how some Mozilla classes are displayed in the debugger.

To enable Unicode string display, do Tools > Options... > Debug and 
check Display unicode strings.

To customize class displays for debugger, edit AUTOEXP.DAT file in your 
MSDEV installation, probably located in:

c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\

Here is what I have added to my file to make it easier to see strings etc.:

;Mozilla
nsString=<mStr,su>
nsCString=<mStr,s>
nsIAtom=<mString,su>

In the beginning of the AUTOEXP.DAT file it explains the format. You 
need to restart MSDEV for the changes to take effect.

Vikram wrote:

> Hi All,
>   I found that there is guide to build the mozilla browser from source
> code at http://www.mozilla.org/build/win32.html and also maintained by
> [EMAIL PROTECTED]
> This also gives debug build.
> 
>  However there isn't any guide about how to start debuggin Browser
> application.
> What software should we use on Win32 for debuggint browser code?
>  However,There is document about how to debug Browser code on
> Linux.(at
> http://www.mozilla.org/unix/debugging-faq.html )
> 
> Regards,
> Vikram


-- 
   Heikki Toivonen


Reply via email to