Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] How to create a custom view to the debug view?

Hello,

This link http://www.eclipse.org/eclipse/debug/documents.php is a good source of Eclipse debugger documentation. Presentations of two last EclipseConfs (with source examples) are very useful and explain practically all parts of Eclipse debug infrastructure with many details.

Eclipse has a common model of debug objects (threads, stack frames and etc.). Our debug model extends Eclipse model and implements many script language specific things using DBGP protocol. The main interfaces are: IScriptThread, IScriptStackFrame, IScriptVariable, IScriptValue. See the source code for more information.

I think your problem can be solved in the following way. The first thing you should investigate is the IDebugEventSetListener. Your class may implement this interface to listen debug events (class DebugEvent). These events give a complete information about debugging process: when debugger suspends, why it suspends (end of step or breakpoint) and etc. DebugEvent has a good javadoc, read it first. So, you can detect the moment when your view should be shown.

Adding information about objects is more complex but realizable task. I think you should use IScriptEvaluationEngine. This interface allow you to execute any code (in this case Tcl code) in the application thread and obtain results as instance of IScriptValue. Evaluation engine interface can be requested through IScriptThread (method getEvaluationEgine). Instance of IScriptThread can be simply extracted from DebugEvent.

This is a short outline of possible solution. Please, ask additional questions for more information.

--
Dmitriy Kovalev

wang dada wrote:
Hi,
Recently I've been studying the debugger of Dltk. What I want to do is adding a custom view to the DebugView, let's say it to be CustomObjectView. When users' scripte suspend at the breakpoint, CustomObjectView will show all the objects created by now. These objects has no relation with Tcl lanuage, they are just the bussiness objects created by users.
For example, users script will be like this:  set i [test::newobject1]
set j [test::new object2] test::new relationship -parent i j And I can get all the objects by using: test::get all to get all the created objects and their relations, and show them in CustomObjectView with a treeViewer. When user click step, CustomObjectView will refresh. Could anyone give me some clue or example code to realize it? I've read articles at http://www.eclipse.org/eclipse/debug/documents.php, but still do not know how to begin. Is there any documents about how to realizing debugger of DLTK? Any advise and help will be greatly appreciated. Best regards, Joy
------------------------------------------------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: <http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXIC> mail, news, photos & more.
--
This message was scanned by ESVA and is believed to be clean.
Click here to report this message as spam. <http://mail-gw-us.xored.com/cgi-bin/learn-msg.cgi?id=8A66B299B1.03B83>
------------------------------------------------------------------------

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




Back to the top