[Libreoffice] Need help to debug with Visual C++ 2008

Tantai Tanakanok tantai at osdev.co.th
Mon Feb 7 00:04:17 PST 2011


Thanks Tor,

I success debug with Attach to process solution but I want to debug the code
that execute when LibO start. Attach to process can only debug after LibO
already started. How can I debug the startup code in VCL?

How can I debug soffice.bin? Any environment variable that I need to set.

Tantai.

On Mon, Feb 7, 2011 at 2:24 PM, Tor Lillqvist <tlillqvist at novell.com> wrote:

> >    2. start Visual Studio and open exe  with File > Open >
> Project/Solution
> >    and choose soffice.exe in program folder.
>
> It is not soffice.exe that is the actual LibreOffice program, it's
> soffice.bin. (Which despite its odd .bin suffix is a totally normal .exe
> file.) Soffice.exe is just a thin wrapper that sets up PATH and then starts
> soffice.bin.
>
> Yes, this can be quite confusing, and especially confusing is that in the
> LO build directory, when actually built, these programs are not called
> soffice.exe and soffice.bin, but, if I recall correctly, what gets installed
> as soffice.exe is called officeloader.exe and what gets installed as
> soffice.bin is called soffice.exe. (And additionally, there is even a
> another copy of that soffice.exe (i.e. the eventual soffice.bin) called
> soffice_oo.exe. I am not kidding, one could not make this stuff up. Of
> course, this is not our bright idea, but legacy from OpenOffice.org. We
> should change it at some point to be less confusing.
>
> And anyway, typically you shouldn't be starting soffice.bin from the
> debugger as then the environment setup that the wrapper soffice.exe does are
> not done and it will not find its DLLs. You should just start it normally
> from Explorer, just the Start Centre, and then attach it from the debugger,
> set your breakpoints, and use it so that the breakpoint gets hit.
>
> Note that you don't need to quite Visual Studio between different runs of
> LibreOffice- You can just detach or terminate the debuggee from VS, rebuild
> more stuff with debugging if you want, copy the this rebuilt DLLs into
> place, start it again (normally, from Explorer), attach soffice.bin again.
> The same breakpoints will be remembered.
>
> >    3. Open a file I want to debug(window.cxx) and set breakpoint at the
> >    ImplUpdateGlobalSettings function.
>
> That is correct, yes. And as long as you are debugging the right program,
> soffice.bin, it will work.
>
> --tml
>
>
>


-- 
_/|\_ Tantai Thanakanok. Open Source Development Co., Ltd.
Tel: +66 38 311816, Fax: +66 38 773128, http://www.osdev.co.th/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110207/6a7bbe42/attachment.htm>


More information about the LibreOffice mailing list