Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
How to debug a plugin?
cyberkoa:
I used to use wxMessageBox to debug but now this time I need to use the GDB to debug. I still couldn't get the way to debug wxSmith .. but I really a newbie in debugging C++ GUI program ..
I have tried to toggle a break point at ScanForPlugins() at main.cpp and press F4 to let the program run to cursor .
another CB instants running , and I try to check the message , the 10 plugins have been loaded , and the keybind has also been loaded :shock: ? the program does not stop at breakpoint ?
I check the Debug menu, only Debug Windows and Stop debugger are not grey , cannot press continue /step over/step into.
Since wxSmith has a different project file , how should I do the debug ? I load the CB project file and toggle the breakpoint at ScanForPlugins and load wxSmith project file , toggle the break point at wxSmith source , is it correct ?
MortenMacFly:
--- Quote from: cyberkoa on November 29, 2005, 06:18:35 am ---another CB instants running , and I try to check the message , the 10 plugins have been loaded , and the keybind has also been loaded :shock: ? the program does not stop at breakpoint ?
--- End quote ---
...when this happens to me I usually had forgotten to enable the "-g" debug compiler switch and/or forgotten to do a full re-build with the new settings. It's an obvious thing but maybe it happened to you as well...?!
Morten.
mandrav:
The debugger in SVN HEAD supports putting a breakpoint *anywhere*, even in DLLs. No need to break on ScanForPlugins or anywhere else. Just put a breakpoint where you need it and press F8.
cyberkoa:
--- Quote from: mandrav on November 29, 2005, 08:58:29 am ---The debugger in SVN HEAD supports putting a breakpoint *anywhere*, even in DLLs. No need to break on ScanForPlugins or anywhere else. Just put a breakpoint where you need it and press F8.
--- End quote ---
Thx :) it is very good !
mandrav:
--- Quote from: mandrav on November 29, 2005, 08:58:29 am ---The debugger in SVN HEAD supports putting a breakpoint *anywhere*, even in DLLs. No need to break on ScanForPlugins or anywhere else. Just put a breakpoint where you need it and press F8.
--- End quote ---
I just want to clarify that "*anywhere*" does not include C++ constructors with gdb.exe. I 'm still converting the hack we used for this...
Navigation
[0] Message Index
[*] Previous page
Go to full version