- This topic has 3 replies, 2 voices, and was last updated 4 years, 7 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › [SOLVED] Debug a plugin
I am developing a plugin and I want to do some debugging but I am not sure how to do it. I am using the SofaPython3 plugin and using a python scene.
Sofa and SofaPython3 are compiled in Release mode, and my own plugin is compiled in Debug mode.
I have tried to start runSofa with my python scene and attach a debugger to the process, but haven’t been sucessful. Do you have any tip to debug a plugin?
Hey @jjcasmar
I rarely compile SOFA and plugins in debug, so I don’t have much experience. Sorry about this.
However, everything shouldn’t be compiled in debug on Linux to get all debugging information?
Hugo
Apparently the plugin was compiled without debug symbols, not sure why. I have wiped the plugin build directory and rerun cmake and now the compiler is adding the correct flag for building the debug symbols.
With that, in case anyone need it in the future: I am using linux and qtcreator as IDE. I just need to ‘Start and Debug an external application’ and run ‘runSofa’ with the scene you want. Breakpoints work fine for the plugin. SOFA itself can be compiled without debug symbols and with -O2 or -O3.
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.