Debugging on Visual Studio (Windows)
Kira Tubo
kira.tubo at gmail.com
Fri Jul 26 00:52:07 UTC 2024
Just following up with this. Specifically for:
*From what I can tell, it looks like soffice.bin and soffice.exe are being
run as administrator (see image below). But not sure how that got set up
that way. How do I make it so these are automatically run as a normal
user? *
[image: image.png]
On Mon, Jul 22, 2024 at 7:04 PM Kira Tubo <kira.tubo at gmail.com> wrote:
> Thanks for looking into this, Miklos/Mike K. A few comments:
>
> 1. Good to know IDE integration is not required for debugging.
> 2. @Mike K, from what I can tell, it looks like soffice.bin and
> soffice.exe are being run as administrator (see image below). But not sure
> how that got set up that way. How do I make it so these are automatically
> run as a normal user?
> 3. You're right, F5 is not required to start debugging after attaching
> soffice.bin to process.
>
>
> [image: image.png]
>
> On Thu, Jul 18, 2024 at 11:23 PM Kaganski Mike <mikekaganski at hotmail.com>
> wrote:
>
>> 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/20240725/10b62743/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 298219 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240725/10b62743/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 298219 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240725/10b62743/attachment-0003.png>
More information about the LibreOffice
mailing list