Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

How to debug a plugin?

(1/2) > >>

Zlika:
Hi!
I'm working on a little plugin but I don't know how to debug it.
If someone could tell me how I should do...
Thank you

Zlika

rickg22:
OK um... first, make sure the "Allow only single instance" (or something) option is disabled in the environment settings. Now, with the codeblocks project on, debug it this way:

there's the InitFrame (or something) function in main.cpp (or was it app.cpp?). Anyway, there's a "scanForPlugins" (or something) function, to debug your plugin, just hit f4 in that line so codeblocks will execute.

Then you're able to set up the breakpoints in your plugin. ta-da :)

But personally, I find it easier to do messagebox() functions and codeblocks' debug log. Yeah it's tedious, but doesn't actually need a debugger for it (unless you're having segfaults).

Zlika:
Thank you for the answer.
Concerning the "CodeBlocks's debug log", I have seen how to send messages to it but... I don't know where it is printed!? In a file or somewhere in the CodeBlocks IDE? I thougth it was in the "CodeBlocks Debug" tab but I can't see any of my outputs! Maybe I don't use the right function to do it...

Zlika

rickg22:
i think it's debuglog or something. Check the messagemanager class to see how it works.

byo:
Firsrt turn on  Settings->Environment->Application's debug log - it turns on new tab on Messages pane - there's all You need :)

EDIT: I haven't read this topic carefully. Do You use Manager::Get()->GetMessageManager()->DebugLog ?

Navigation

[0] Message Index

[#] Next page

Go to full version