harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject Re: [general][debug] how to debug harmony using vs?
Date Tue, 11 Mar 2008 15:53:35 GMT
Simon,
I attach VS when a debugger side effect (aka "green threads") is
wanted. If not, just use another way as Pavel and Gregory suggested.

Thanks.


On Tue, Mar 11, 2008 at 5:15 PM, Pavel Pervov <pmcfirst@gmail.com> wrote:
> You can instrument your code just as Gregory suggested.
>
>  Use the construct like this:
>
>  if(my_condition) {
>     _CrtDbgBreak();
>  }
>
>  'if' clause can be skipped.
>
>  Then run your app outside Visual Studio, but keep VS open with the
>  project in it. Once dialog box pops up asking if you want to debug
>  answer 'yes' and select VS you have opened. It will attach to your app
>  and show you the source, where you've inserved your instrumentation.
>
>  Pavel.
>
>
>
>  On 3/11/08, Simon Chow <simon.harmony@gmail.com> wrote:
>  > Thank you, Alexei
>  > So is there any suggestion or acrobatics to make the debugger's side effect
>  > less?
>  >
>  > On 11/03/2008, Alexei Fedotov <alexei.fedotov@gmail.com> wrote:
>  > >
>  > > I usually configure "Debugging" tab from inside the active project
>  > > properties to use a binary which is built by ant. Running the process
>  > > with VS attached all the time makes a thread behavior, memory
>  > > violation addresses, etc, more or less reproducible from launch to
>  > > launch.
>  > >
>  > >
>  > > On Tue, Mar 11, 2008 at 3:19 PM, Gregory Shimansky
>  > > <gshimansky@apache.org> wrote:
>  > > > Simon Chow said the following on 11.03.2008 15:14:
>  > > >
>  > > > > I am not very familiar with vs.net. Is there guide for doing this?
>  > > >  > Should I use the executable file generated from ant build or
>  > > >  > vs.netsolution/project build for debugging?
>  > > >
>  > > >  I don't think that using project you can build a fully functional
>  > > >  runtime. Usually I open the project just for files/symbols lookup and
>  > > >  specify executable and command line options in the debug properties.
>  > > >  Then I start debugging _without_ rebuilding the project.
>  > > >
>  > > >  More often I use just-in-time debugging feature. When a process crashes
>  > > >  or hangs I attach MSVC to it from the crash dialog or using task
>  > > manager.
>  > > >
>  > > >  --
>  > > >  Gregory
>  > > >
>  > > >
>  > >
>  > >
>  > >
>  > >
>  > > --
>  > > With best regards,
>  > >
>  > > Alexei
>  > >
>  >
>  >
>  >
>  > --
>  > From : Simon.Chow@Software School of Fudan University
>  >
>
>
>  --
>  Pavel Pervov,
>  Intel Enterprise Solutions Software Division
>



-- 
With best regards,
Alexei

Mime
View raw message