+3 votes

Is it possible to debug GDnative plugin? I am talking about Plugin not the engine module


I have written GDnative/GDScript in c++ and I can run it in godot fine. Only thing I am missing is possibility to debug the plugin code (library)

I was looking to somehow attach debugger. I am using CLion for C++ development and Godot ide obviously to run the code.

asked Jul 6, 2018 in Engine by mikekulasinski (26 points)

Any solution to this ?
Would be looking a way to debug the C++ GDNative script using QT Creator preferably.

2 Answers

0 votes

It should be possible to debug a GDNative plugin just like you can debug any dynamic library. I think attach to process should work fine.
Maybe you can make it automatically attach but it depends on the IDE, I'm not sure how CLion works.

answered Jul 6, 2018 by Zylann (26,045 points)

Hey thanks for the answer This is what I thought however it does not work. I build my library using debug option and then run godot. I couldn't attach the debugger to the process it gives me some error, I am not sure what it was as I'm not in front of my pc at the moment. But definitely refuses to do so.

0 votes

Answering myself also, just add debug information to your build, and for example with QT Creator add your debug points, start the application from Godot and then attach to running process to debug,.

answered Jan 10 by Sakari Lehtonen (25 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.