Debugging on Visual Studio (Windows)
Kaganski Mike
mikekaganski at hotmail.com
Fri Jul 19 06:23:50 UTC 2024
On 19.07.2024 11:14, Miklos Vajna wrote:
> On Thu, Jul 18, 2024 at 07:30:53PM -0700, Kira Tubo <kira.tubo at gmail.com> wrote:
>> 2. In Cygwin: make vs-ide-integration
>> 3. In Visual Studio, open LibreOffice.sln
>> 4. Add breakpoints to a .cxx file
>
> To be clear, this is for the IDE integration, debugging doesn't need
> that, it would be for tab completion while editing code, etc.
>
> If you just want to debug, you can simply open the file in question and
> put breakpoints there, no need for any kind of projects.
Just to clarify: while VS IDE integration is not required, it doesn't hurt, and can't be a reason of any failure like discussed here.
>> 5. In Cygwin: instdir/program/soffice.exe
>> 6. In Visual Studio, Debug > Attach to Process > soffice.bin (at this
>> point, it asked me to run VS with admin privileges)
>
> I don't recall I had to have admin privileges to debug a normal
> soffice.bin process, but otherwise yes, that's how you do it, yes.
The admin privileges request is most suspicious. I would blame it for everything, e.g. I could suspect that there is a problem that admin process working with other environment variables could simply be unable to find the symbols.
There must not be an admin request. It needs clarification, if you use different users to run VS, and run LO.
>> 7. F5 to start debugging
>
> Not sure you need this step, possibly once you attach the debugger to
> the process, it'll wait for your breakpoint to be hit, so you don't have
> to start anything.
Of course, attaching to a running process doesn't need F5 until a breakpoint hit, or otherwise paused; when in pause, F5 would resume (and F10 would step over).
--
Best regards,
Mike Kaganski
________________________________
От: LibreOffice <libreoffice-bounces at lists.freedesktop.org> от имени Miklos Vajna <vmiklos at collabora.com>
Отправлено: 19 июля 2024 г. 9:14
Кому: Kira Tubo <kira.tubo at gmail.com>
Копия: libreoffice at lists.freedesktop.org <libreoffice at lists.freedesktop.org>
Тема: Re: Debugging on Visual Studio (Windows)
Hi Kira,
On Thu, Jul 18, 2024 at 07:30:53PM -0700, Kira Tubo <kira.tubo at gmail.com> wrote:
> I'm having difficulty debugging using Visual Studio on Windows. Not sure if
> I am doing something wrong or I'm missing some things that need to be
> installed.
>
> 1. I have --enable-dbgutil set up in my autogen.input file
Good, at this point you should have debug symbols.
> 2. In Cygwin: make vs-ide-integration
> 3. In Visual Studio, open LibreOffice.sln
> 4. Add breakpoints to a .cxx file
To be clear, this is for the IDE integration, debugging doesn't need
that, it would be for tab completion while editing code, etc.
If you just want to debug, you can simply open the file in question and
put breakpoints there, no need for any kind of projects.
> 5. In Cygwin: instdir/program/soffice.exe
> 6. In Visual Studio, Debug > Attach to Process > soffice.bin (at this
> point, it asked me to run VS with admin privileges)
I don't recall I had to have admin privileges to debug a normal
soffice.bin process, but otherwise yes, that's how you do it, yes.
> 7. F5 to start debugging
Not sure you need this step, possibly once you attach the debugger to
the process, it'll wait for your breakpoint to be hit, so you don't have
to start anything.
Regards,
Miklos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240719/ccaec720/attachment.htm>
More information about the LibreOffice
mailing list