RE: Debugging on Visual Studio (Windows)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.07.2024 11:14, Miklos Vajna wrote:
> On Thu, Jul 18, 2024 at 07:30:53PM -0700, Kira Tubo <kira.tubo@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx> от имени Miklos Vajna <vmiklos@xxxxxxxxxxxxx>
Отправлено: 19 июля 2024 г. 9:14
Кому: Kira Tubo <kira.tubo@xxxxxxxxx>
Копия: libreoffice@xxxxxxxxxxxxxxxxxxxxx <libreoffice@xxxxxxxxxxxxxxxxxxxxx>
Тема: Re: Debugging on Visual Studio (Windows)
 
Hi Kira,

On Thu, Jul 18, 2024 at 07:30:53PM -0700, Kira Tubo <kira.tubo@xxxxxxxxx> 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

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux