TTK Debugging

41 views
Skip to first unread message

Shubham Chopra

unread,
Sep 5, 2020, 5:29:35 PM9/5/20
to ttk-users
Hi,

This isn't particularly a TTK question, but any help would be highly appreciated.
I followed the instructions to build from source and install TTK. I'm using Windows.

However, I wish to debug the code (step into the functions using Visual Studio). I wanted to understand how that can be done, assuming I have the build information (.pdbs, .dlls and .libs). I tried to link the corresponding .dlls, but I can only view the code in the header files.

To be clear on what I want to do, for instance, for the Contour Tree,
vtkSmartPointer<ttkFTMTree> contourTree
  = vtkSmartPointer<ttkFTMTree>::New();
  contourTree->SetInputData(reader->GetOutput());
  contourTree->SetTreeType(ttk::ftm::TreeType::Contour);
  contourTree->SetSuperArcSamplingLevel(0);
  contourTree->Update();

I wish to step-into the code and undertand how the Contour Tree is being formed and the general code flow. Is this possible?

If it's easier to do this in Linux, I can do that as well.

Thanks,
Shubham

Jaswant Panchumarti

unread,
Sep 7, 2020, 1:53:42 AM9/7/20
to ttk-users
I do exactly what you're talking about every time.
  1.  Set the build type to Debug/RelWithDebiInfo in CMake (look here).  This can be done from Cmake-gui. 
  2. Then, configure, generate, build, install and replace whatever is existing in your environment path related to TTK with that of the debug install. 
And for the record, it's easy to do it on Linux as well, "cmake .... -DCMAKE_BUILD_TYPE=Debug" but you'll be crippled without Visual Studio's helpful debugger.
Reply all
Reply to author
Forward
0 new messages