[mlpack] Issue with debugging

Ryan Curtin ryan at ratml.org
Fri Apr 23 19:33:48 EDT 2021


On Tue, Apr 20, 2021 at 10:59:57AM +0530, Gopi Manohar Tatiraju wrote:
> Hello mlpack,
> 
> I use visual studio for mlpack development. I build mlpack and then link it
> using task.json and launch.jon files in vscode.
> 
> I wrote this simple example:
> 
> #include <mlpack/core.hpp>
> > #include "armadillo"
> > using namespace std;
> > int main()
> > {
> >     arma::mat foo;
> >     mlpack::data::DatasetInfo info;
> >     mlpack::data::Load("data/data.csv", foo, info, arma::csv_ascii);
> >     foo.t().raw_print();
> >     return 0;
> > }
> 
> 
> When I am putting a breakpoint on *mlpack::data::DatasetInfo info *my
> debugger is working fine and stepping into that line but when I am putting
> a breakpoint on line *mlpack::data::Load("data/data.csv", foo, info,
> arma::csv_ascii)*, it is not stepping into this function but rather
> whatever I do it step's over this line.

I'm not an expert at Visual Studio, but is it possible that the function
`mlpack::data::Load()` is actually compiled inside of mlpack.dll, and
there are no debugging symbols available?

You might be able to fix this by recompiling mlpack with debugging
symbols.  But, I don't know exactly how to do this with Visual Studio.

-- 
Ryan Curtin    | "Excuse me.  I don't mean to impose, but I am the
ryan at ratml.org | Ocean."  - Bobby


More information about the mlpack mailing list