osdir.com


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

Re: [QUESTION] Best way to attach debugger to CPP tests?


hi Atri,

Generally I use gdb and use the --gtest_filter argument to the test executables

$ gdb --args test-name --gtest_filter=*TestOfInterest*

Then set breakpoints in gdb as usual. C-x a brings up the visual gdb interface

- Wes
On Sun, Sep 16, 2018 at 9:45 AM Atri Sharma <atri.jiit@xxxxxxxxx> wrote:
>
> I am trying to run compute-test.cc tests and trace their execution,
> but not sure what is the best mechanism for running individual tests
> and tracing their code flow. I looked up the wiki but could not find
> specific instructions.
>
> Could someone point me to the best practices around attaching a debugger?
>
> Regards,
>
> Atri