You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Regina Henschel <rb...@t-online.de> on 2012/10/31 12:35:59 UTC

Looking for guide to debug with MS Visual Studio Express

Hi all,

I read that debugging with MS Visual Studio works well. Is there 
somewhere a guide for dummies how to do it?

Kind regards
Regina

Re: Looking for guide to debug with MS Visual Studio Express

Posted by Rob Weir <ro...@apache.org>.
On Wed, Oct 31, 2012 at 9:38 AM, Jürgen Schmidt <jo...@gmail.com> wrote:
> On 10/31/12 12:59 PM, Andor E wrote:
>> Hi,
>> I have some doubts, that Visual Studio Express will work. The debugger
>> of VS Express is limited severly in comparison to VS Professional.
>> I have also just looked it up and Remote Debugging doesn't work in VS
>> Express. That's what I would have used.
>> So if you can, get a copy of VS Professional. Otherwise I believe,
>> that you're out of luck.
>
> The professional might works better but the express version works as well.
>
> @Regina, just try it
>

And remember that Microsoft at one point was offering free MSDN
subscriptions to Apache Committers.  That would be a good way to get
access to the full debugging features.

-Rob


> Juergen
>
>
>>
>> Greetings
>>
>> eymux
>>
>> On Wed, Oct 31, 2012 at 12:35 PM, Regina Henschel
>> <rb...@t-online.de> wrote:
>>> Hi all,
>>>
>>> I read that debugging with MS Visual Studio works well. Is there somewhere a
>>> guide for dummies how to do it?
>>>
>>> Kind regards
>>> Regina
>

Re: Looking for guide to debug with MS Visual Studio Express

Posted by Jürgen Schmidt <jo...@gmail.com>.
On 10/31/12 12:59 PM, Andor E wrote:
> Hi,
> I have some doubts, that Visual Studio Express will work. The debugger
> of VS Express is limited severly in comparison to VS Professional.
> I have also just looked it up and Remote Debugging doesn't work in VS
> Express. That's what I would have used.
> So if you can, get a copy of VS Professional. Otherwise I believe,
> that you're out of luck.

The professional might works better but the express version works as well.

@Regina, just try it

Juergen


> 
> Greetings
> 
> eymux
> 
> On Wed, Oct 31, 2012 at 12:35 PM, Regina Henschel
> <rb...@t-online.de> wrote:
>> Hi all,
>>
>> I read that debugging with MS Visual Studio works well. Is there somewhere a
>> guide for dummies how to do it?
>>
>> Kind regards
>> Regina


Re: Looking for guide to debug with MS Visual Studio Express

Posted by Andor E <ey...@gmail.com>.
Hi,
I have some doubts, that Visual Studio Express will work. The debugger
of VS Express is limited severly in comparison to VS Professional.
I have also just looked it up and Remote Debugging doesn't work in VS
Express. That's what I would have used.
So if you can, get a copy of VS Professional. Otherwise I believe,
that you're out of luck.

Greetings

eymux

On Wed, Oct 31, 2012 at 12:35 PM, Regina Henschel
<rb...@t-online.de> wrote:
> Hi all,
>
> I read that debugging with MS Visual Studio works well. Is there somewhere a
> guide for dummies how to do it?
>
> Kind regards
> Regina

Re: Looking for guide to debug with MS Visual Studio Express

Posted by Oliver-Rainer Wittmann <or...@googlemail.com>.
Hi,


On 04.11.2012 20:04, Regina Henschel wrote:
> Hi Andre,
>
> Andre Fischer schrieb:
>> On 31.10.2012 13:40, Oliver-Rainer Wittmann wrote:
>>> Hi,
>>>
>>> On 31.10.2012 12:35, Regina Henschel wrote:
>>>> Hi all,
>>>>
>>>> I read that debugging with MS Visual Studio works well. Is there
>>>> somewhere a
>>>> guide for dummies how to do it?
>>>>
>>>
>>> The following steps should give you a start:
>>> - Have your AOO build installed on the system.
>>> - Build the module of interest with debug information
>>> - Copy the resulting DLLs and PDB files of the module into the
>>> corresponding directory of the installation.
>>> -- for "gbuild" modules like sw you find the DLLs and PDB files in
>>> /main/solver/350/wntmsci12/workdir/LinkTarget/Library/
>>> -- for "dmake" modules like sd you find the DLLs and PDB files in
>>> /main/[module]/wntmsci12/bin/
>>
>> I do it a little differently from here on because I am a lazy person who
>> wants to press just one key to start debugging:
>>
>> - Start Visual Studio
>>    The Express version is just fine.  I have been using it for most of
>> my debugging for years.
>>
>> - File->New Project
>>
>> - In the new dialog:
>>    - In left list "Installed Templates" choose Visual C++->General
>>    - In center list choose "Empty Project"
>>    - In field near the bottom "Location" enter a path where the solution
>> files will be stored.
>>    - In the field above that, "Name", enter the name of the new project,
>> eg "aoo35"
>>    - Click OK to close dialog
>>
>> - Now the main window shows a new view.
>> - In the "Solution Explorer" on the left side you will now see an entry
>> in bold typeface named "aoo35".
>> - I usually delete the entries below it "Header Files", "Resource
>> Files", "Source Files".  These are used only when Visual Studio is used
>> for editing. But that is just for my convenience
>> - Right click on the "aoo35" entry.
>> - Click "Properties"
>>
>> - In the "aoo35 Property Pages" dialog:
>>    - Select "Configuration Properties->Debugging" in the left box.
>>    - In the center box change values for "Command" to
>>      "<office-installation-path>/OpenOffice.org 3/program/soffice.bin"
>>      The .bin is important, do not use .exe
>>    - Set value for "Environment" to
>>      "PATH=<office-installation-path>/OpenOffice.org 3/URE/bin"
>>    - [optional] Set value of "Command Arguments" to <filename> to load a
>> file when AOO starts or to eg "-impress" to start AOO with the Impress
>> application.
>>    - Click OK to close dialog
>>
>>
>> Now you are all set
>> Just press "F5" to start Apache OpenOffice.
>
> I have followed your guide. I find all items you have mentioned :)
> I now get some informations from MSVC. I have copied them to the issue
> https://issues.apache.org/ooo/show_bug.cgi?id=121139
> Any tips what I can do in addition to get useful informations?
>

I saw first your comment on the issue.
Please have a look at my reply in the issue.

Best regards, Oliver.

Re: Looking for guide to debug with MS Visual Studio Express

Posted by Regina Henschel <rb...@t-online.de>.
Hi Andre,

Andre Fischer schrieb:
> On 31.10.2012 13:40, Oliver-Rainer Wittmann wrote:
>> Hi,
>>
>> On 31.10.2012 12:35, Regina Henschel wrote:
>>> Hi all,
>>>
>>> I read that debugging with MS Visual Studio works well. Is there
>>> somewhere a
>>> guide for dummies how to do it?
>>>
>>
>> The following steps should give you a start:
>> - Have your AOO build installed on the system.
>> - Build the module of interest with debug information
>> - Copy the resulting DLLs and PDB files of the module into the
>> corresponding directory of the installation.
>> -- for "gbuild" modules like sw you find the DLLs and PDB files in
>> /main/solver/350/wntmsci12/workdir/LinkTarget/Library/
>> -- for "dmake" modules like sd you find the DLLs and PDB files in
>> /main/[module]/wntmsci12/bin/
>
> I do it a little differently from here on because I am a lazy person who
> wants to press just one key to start debugging:
>
> - Start Visual Studio
>    The Express version is just fine.  I have been using it for most of
> my debugging for years.
>
> - File->New Project
>
> - In the new dialog:
>    - In left list "Installed Templates" choose Visual C++->General
>    - In center list choose "Empty Project"
>    - In field near the bottom "Location" enter a path where the solution
> files will be stored.
>    - In the field above that, "Name", enter the name of the new project,
> eg "aoo35"
>    - Click OK to close dialog
>
> - Now the main window shows a new view.
> - In the "Solution Explorer" on the left side you will now see an entry
> in bold typeface named "aoo35".
> - I usually delete the entries below it "Header Files", "Resource
> Files", "Source Files".  These are used only when Visual Studio is used
> for editing. But that is just for my convenience
> - Right click on the "aoo35" entry.
> - Click "Properties"
>
> - In the "aoo35 Property Pages" dialog:
>    - Select "Configuration Properties->Debugging" in the left box.
>    - In the center box change values for "Command" to
>      "<office-installation-path>/OpenOffice.org 3/program/soffice.bin"
>      The .bin is important, do not use .exe
>    - Set value for "Environment" to
>      "PATH=<office-installation-path>/OpenOffice.org 3/URE/bin"
>    - [optional] Set value of "Command Arguments" to <filename> to load a
> file when AOO starts or to eg "-impress" to start AOO with the Impress
> application.
>    - Click OK to close dialog
>
>
> Now you are all set
> Just press "F5" to start Apache OpenOffice.

I have followed your guide. I find all items you have mentioned :)
I now get some informations from MSVC. I have copied them to the issue 
https://issues.apache.org/ooo/show_bug.cgi?id=121139
Any tips what I can do in addition to get useful informations?

Kind regards
Regina


Re: Looking for guide to debug with MS Visual Studio Express

Posted by Andre Fischer <aw...@gmail.com>.
On 31.10.2012 13:40, Oliver-Rainer Wittmann wrote:
> Hi,
>
> On 31.10.2012 12:35, Regina Henschel wrote:
>> Hi all,
>>
>> I read that debugging with MS Visual Studio works well. Is there 
>> somewhere a
>> guide for dummies how to do it?
>>
>
> The following steps should give you a start:
> - Have your AOO build installed on the system.
> - Build the module of interest with debug information
> - Copy the resulting DLLs and PDB files of the module into the 
> corresponding directory of the installation.
> -- for "gbuild" modules like sw you find the DLLs and PDB files in 
> /main/solver/350/wntmsci12/workdir/LinkTarget/Library/
> -- for "dmake" modules like sd you find the DLLs and PDB files in 
> /main/[module]/wntmsci12/bin/

I do it a little differently from here on because I am a lazy person who 
wants to press just one key to start debugging:

- Start Visual Studio
   The Express version is just fine.  I have been using it for most of 
my debugging for years.

- File->New Project

- In the new dialog:
   - In left list "Installed Templates" choose Visual C++->General
   - In center list choose "Empty Project"
   - In field near the bottom "Location" enter a path where the solution 
files will be stored.
   - In the field above that, "Name", enter the name of the new project, 
eg "aoo35"
   - Click OK to close dialog

- Now the main window shows a new view.
- In the "Solution Explorer" on the left side you will now see an entry 
in bold typeface named "aoo35".
- I usually delete the entries below it "Header Files", "Resource 
Files", "Source Files".  These are used only when Visual Studio is used 
for editing. But that is just for my convenience
- Right click on the "aoo35" entry.
- Click "Properties"

- In the "aoo35 Property Pages" dialog:
   - Select "Configuration Properties->Debugging" in the left box.
   - In the center box change values for "Command" to
     "<office-installation-path>/OpenOffice.org 3/program/soffice.bin"
     The .bin is important, do not use .exe
   - Set value for "Environment" to
     "PATH=<office-installation-path>/OpenOffice.org 3/URE/bin"
   - [optional] Set value of "Command Arguments" to <filename> to load a 
file when AOO starts or to eg "-impress" to start AOO with the Impress 
application.
   - Click OK to close dialog


Now you are all set
Just press "F5" to start Apache OpenOffice.

We probably should write a Wiki page for this.
There is one [1] about "Windows Debugging" but it looks quite scary.
Another one [2] is for the advanced Visual Studio user and tells you how 
to better visualize eg boost containers.


Have fun,
Andre


[1] http://wiki.openoffice.org/wiki/Windows_Debugging
[2] http://wiki.openoffice.org/wiki/VisualStudioVisualizer



Re: Looking for guide to debug with MS Visual Studio Express

Posted by Oliver-Rainer Wittmann <or...@googlemail.com>.
Hi,

On 31.10.2012 12:35, Regina Henschel wrote:
> Hi all,
>
> I read that debugging with MS Visual Studio works well. Is there somewhere a
> guide for dummies how to do it?
>

The following steps should give you a start:
- Have your AOO build installed on the system.
- Build the module of interest with debug information
- Copy the resulting DLLs and PDB files of the module into the corresponding 
directory of the installation.
-- for "gbuild" modules like sw you find the DLLs and PDB files in 
/main/solver/350/wntmsci12/workdir/LinkTarget/Library/
-- for "dmake" modules like sd you find the DLLs and PDB files in 
/main/[module]/wntmsci12/bin/
- Start your installed AOO build
- Start MS Visual Studio
- Via Menu Debug - Attach to process you need to attach process soffice.bin to 
the debugger.
- Now, you can open a source file of your module of interest in order to debug 
the code of interest by inserting a breakpoint.
- You can also investigate a crash as the debugger will take over in case that a 
crash occurs in AOO.
- You have the possibility to stop the execution of AOO - Toolbar function Break 
All - and investigate the call stacks of the stopped threads of AOO. 
Continuation or single command stepping is also possible

Just play around with the different debugger tools.

Hope that give you a first start.


Best regards, Oliver.