xslt debugger plugin for Kate
Keith Isdale
keithisdale at gmail.com
Wed Oct 31 22:31:48 GMT 2018
Hi Franco,
I will provide an overview of xsldbg plugin for kate first and then answer
your question in-line.
Getting started with xsldbg plugin for kate involves
1) installing its development dependencies ( see README.md, for example see
https://sourceforge.net/projects/xsldbg/files/kxsldbg/kxsldbg-4.7.0/)
2) building the plugin and installing it
2.1) possible rpm based distro is being used, if so try one of the provided
spec files. Feedback to improve these very basic spec files would be good
though they worked for me on my test systems.
2.2) possibly a debian based distro is being used; at this point I need
some help to create the 'debian' directory and debian source packages
3) enabling the 'xsldbg' plugin when needed in Kate
4) configuring plugin via the 'Configure' tool button to suit the XML/XSLT
scripts
5) start a run script via the 'Run' tool button
6) debug needed for example
6.1) add breakpoints
6.2) open "Inspector" dialog to view a lot of available data with the XSLT
engine
In case it helps
* some screenshot of xsldbg plugin are available at
https://sourceforge.net/projects/xsldbg/
* example/test scripts available in source package and at
https://sourceforge.net/p/xsldbg/xsldbg/ci/master/tree/tests/
If there is community interest, I am considering providing a 'lite' mode
for kate xsldbg plugin that has views similar to the gdb plugin. The
current 'Inspector' dialog approach was used as easy was to provide access
to as much of the xslt engine's data as possible.
On Thu, 1 Nov 2018, 3:24 AM Francisco de ZuvirÃa Allende <
franciscodezuviria at gmail.com> wrote:
> Keith,
>
> I use xml heavily on my environment. I would like to try out your plugin.
>
> The thing is, I haven't worked before with xslt scripts, but I would like
> to.
>
> 1: How do I make xslt scripts that are debuggeable by your plugin?
> what options do I have? (if they are scripts with shebang, all the
> better)
>
Therer is no code changes needed to make xslt scripts debuggable.
Note that
* the scripts can be local file or hosted by ftp/http server
* a significant amount of effort was spent adding support included/imported
xslt scripts
* xslt variables with literal values such as 'somevalue' can be changed
during execution within the 'local variable' inspector. Updating of
variable with xpath to node set such as "\mydoc\somenode" is not yet
possible.
* very large xslt scripts can be debugged however may execute slowly until
some automatic xslt engine updates are disabled in Inspector dialogs
For your interest, the xsldbg core code makes use of debugger hooks that
were added to the libxslt engine in about the year 2002. This has proven
very stable API approach with only minor changes needed in xsldbg over the
years.
> 2: I haven installed 3rd party plugins yet. Is it a drag n drop
> process, or do I have to build kate to do that? (If that's the case I
> will check the available "build it" tutorial)
>
I believe the overview above will get you going :). If not i will update
documentation according to feedback.
The bigest challenge is for those using distro that does not have Kate for
KF5 installed which occurs, for example, in the Centos7 distro that I used
for testing. I have covered that case in the provided README.md.
Regards,
Keith
-----------------
Keith Isdale
email: keithisdale at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20181101/81f8542f/attachment.html>
More information about the KWrite-Devel
mailing list