<div dir="ltr">Thanks for looking into this, Miklos/Mike K. A few comments:<div><ol><li>Good to know IDE integration is not required for debugging. </li><li>@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? <br></li><li>You're right, F5 is not required to start debugging after attaching soffice.bin to process.</li></ol><div><br></div></div><div><img src="cid:ii_lyxroear1" alt="image.png" width="472" height="266"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2024 at 11:23 PM Kaganski Mike <<a href="mailto:mikekaganski@hotmail.com">mikekaganski@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6690342752556075485">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
On 19.07.2024 11:14, Miklos Vajna wrote:</div>
<div style="white-space:pre-wrap;width:98vw;display:block;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
> On Thu, Jul 18, 2024 at 07:30:53PM -0700, Kira Tubo <<a href="mailto:kira.tubo@gmail.com" target="_blank">kira.tubo@gmail.com</a>> wrote:<br>
>> 2. In Cygwin: make vs-ide-integration<br>
>> 3. In Visual Studio, open LibreOffice.sln<br>
>> 4. Add breakpoints to a .cxx file<br>
> <br>
> To be clear, this is for the IDE integration, debugging doesn't need<br>
> that, it would be for tab completion while editing code, etc.<br>
> <br>
> If you just want to debug, you can simply open the file in question and<br>
> put breakpoints there, no need for any kind of projects.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
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.<br>
<br>
</div>
<div style="white-space:pre-wrap;width:98vw;display:block;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
>> 5. In Cygwin: instdir/program/soffice.exe<br>
>> 6. In Visual Studio, Debug > Attach to Process > soffice.bin (at this<br>
>> point, it asked me to run VS with admin privileges)<br>
> <br>
> I don't recall I had to have admin privileges to debug a normal<br>
> soffice.bin process, but otherwise yes, that's how you do it, yes.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
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.<br>
<br>
There must not be an admin request. It needs clarification, if you use different users to run VS, and run LO.<br>
<br>
</div>
<div style="white-space:pre-wrap;width:98vw;display:block;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
>> 7. F5 to start debugging<br>
> <br>
> Not sure you need this step, possibly once you attach the debugger to<br>
> the process, it'll wait for your breakpoint to be hit, so you don't have<br>
> to start anything.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
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).<br>
<br>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
--<br>
Best regards,<br>
Mike Kaganski</div>
<div id="m_6962862166207731893appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_6962862166207731893divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>От:</b> LibreOffice <<a href="mailto:libreoffice-bounces@lists.freedesktop.org" target="_blank">libreoffice-bounces@lists.freedesktop.org</a>> от имени Miklos Vajna <<a href="mailto:vmiklos@collabora.com" target="_blank">vmiklos@collabora.com</a>><br>
<b>Отправлено:</b> 19 июля 2024 г. 9:14<br>
<b>Кому:</b> Kira Tubo <<a href="mailto:kira.tubo@gmail.com" target="_blank">kira.tubo@gmail.com</a>><br>
<b>Копия:</b> <a href="mailto:libreoffice@lists.freedesktop.org" target="_blank">libreoffice@lists.freedesktop.org</a> <<a href="mailto:libreoffice@lists.freedesktop.org" target="_blank">libreoffice@lists.freedesktop.org</a>><br>
<b>Тема:</b> Re: Debugging on Visual Studio (Windows)</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>Hi Kira,<br>
<br>
On Thu, Jul 18, 2024 at 07:30:53PM -0700, Kira Tubo <<a href="mailto:kira.tubo@gmail.com" target="_blank">kira.tubo@gmail.com</a>> wrote:<br>
> I'm having difficulty debugging using Visual Studio on Windows. Not sure if<br>
> I am doing something wrong or I'm missing some things that need to be<br>
> installed.<br>
> <br>
> 1. I have --enable-dbgutil set up in my autogen.input file<br>
<br>
Good, at this point you should have debug symbols.<br>
<br>
> 2. In Cygwin: make vs-ide-integration<br>
> 3. In Visual Studio, open LibreOffice.sln<br>
> 4. Add breakpoints to a .cxx file<br>
<br>
To be clear, this is for the IDE integration, debugging doesn't need<br>
that, it would be for tab completion while editing code, etc.<br>
<br>
If you just want to debug, you can simply open the file in question and<br>
put breakpoints there, no need for any kind of projects.<br>
<br>
> 5. In Cygwin: instdir/program/soffice.exe<br>
> 6. In Visual Studio, Debug > Attach to Process > soffice.bin (at this<br>
> point, it asked me to run VS with admin privileges)<br>
<br>
I don't recall I had to have admin privileges to debug a normal<br>
soffice.bin process, but otherwise yes, that's how you do it, yes.<br>
<br>
> 7. F5 to start debugging<br>
<br>
Not sure you need this step, possibly once you attach the debugger to<br>
the process, it'll wait for your breakpoint to be hit, so you don't have<br>
to start anything.<br>
<br>
Regards,<br>
<br>
Miklos<br>
</div>
</span></font></div>
</div>
</div></blockquote></div>