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

Python Debugger

<< < (14/15) > >>

dmoore:

--- Quote from: Alpha on October 16, 2012, 04:52:59 am ---
--- Quote from: dmoore on October 14, 2012, 05:22:51 pm ---BTW, using  wxString rpdb_wrap_path = ConfigManager::GetDataFolder() + _T("/python/PyDebugger/rpdb_wrap.py");, you should test GetDataFolder with true and false. Depending on the setup, the python files could be installed to a global or local place.

--- End quote ---
Just an implementation note: I believe the preferred function is ConfigManager::GetFolder(SearchDirs dir) - so ConfigManager::GetFolder(sdDataUser) and ConfigManager::GetFolder(sdDataGlobal) would be used (which makes the purpose of the command a little more readable).

--- End quote ---

Good point. Thanks.

Falldog:

--- Quote from: dmoore on October 16, 2012, 03:56:18 am ---Thinking more about this. I noticed that rpdb2 uses an XMLRPC server for the communication between the command line debugger and the debuggee. That means you could bypass the command line debugger and communicate directly with the debuggee from the plugin using XMLRPC, which would probably give better performance.

I have XMLRPC set up and  working pretty nicely for the Python Code Completion plugin. A couple of modules takes care of all the grunt work (xmlrpc_embedder and XmlRpcEvents) and they could easily be deployed as a shared lib for the debugger as well. XMLRPC has the advantage of being built into python. I don't personally care about the distinction between XML and Json -- it's just an implementation detail. (I could even make the rpc module capable of supporting either)

--- End quote ---
Yes, this is good point,
I had notice rpdb2 use XMLRPC to communicate between debugger and debuggee,
I think that I just too lazy to use rpdb_wrap.py directly.... it's the easy way to do :-\
maybe implement XMLRPC in PyDebugger to communicate with debuggee directly will win better performance
But I need some time to survey that, to make it possible.

dmoore:
I would suggest you get your current implementation working first. Then we can investigate alternatives. I find rpdb2.py very hard to grok. Not many comments, too much stuff in one file.

daniloz:
Hi there,

I've just downloaded the Python Debugger plugin sources from http://svn.berlios.de/svnroot/repos/cbilplugin/trunk (rev. 408 from 08 Nov 2012) and tried to compile against the latest code::Blocks (rev. 8785) but i got the following errors:


--- Code: ---C:\Work\codeblocks_trunk\src\plugins\cbilplugin\CBPythonPlugin\PyPlugin.h|64|error: conflicting return type specified for 'virtual bool PyPlugin::AddBreakpoint(const wxString&, int)'|
C:\Work\codeblocks_trunk\src\include\cbplugin.h|493|error:   overriding 'virtual std::tr1::shared_ptr<cbBreakpoint> cbDebuggerPlugin::AddBreakpoint(const wxString&, int)'|

--- End code ---

Looks like the code in PyPlugin.* was not updated to reflect the latest changes in cbplugin.h.

Does anyone has a newer version that works?  ;)

dmoore:
I am pretty sure that I updated it on one of my machines a while back. The only question is which one :) I'll take a look when I get home tonight and commit it if I can find it. It's a pretty simple set of changes if I recall.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version