Brian Frost
Brian Frost

Reputation: 13454

dwscript - can anyone help with editor-debugger examples please?

I'm looking at the excellent dwscript for Delphi see here which provides a useful set of classes to implement a built in pascal script for your Application. I would very much appreciate some help with an example of how to link together the supplied debugging interface with an editor so that I can create breakpoints (and ideally see watches). Has anyone gone along this route please? Thanks, Brian

Upvotes: 3

Views: 802

Answers (1)

Eric Grange
Eric Grange

Reputation: 6211

Most of the debugger doc is currently in this post

http://delphitools.info/2010/12/03/spotlight-on-dwss-idebugger/

Also the debugger interface hasn't changed much (if at all) since the original DWScript II (on SourceForge), so the old demos there should hopefully still work with minimal adjustments.

http://sourceforge.net/projects/dws/

For breakpoints, you basically just check the source position of the Expr you get in DoDebug/OnDebug against the list of breakpoints. One simple and efficient way is to merely use TBits -using it as a boolean array of which lines have a breakpoint). Evaluating/watching requires looking up a symbol, which will give you it's stack address, you can then lookup the value in the stack.

I'll try to add/update a debugging tasks demo for v2.2 (unless someone else does it before me ;) )

edit: as of 11-02-14 there is a TdwsDebugger component to facilitate debugging tasks.

Upvotes: 2

Related Questions