项目作者: philschatz

项目描述 :
XSLT Debugger for VSCode
高级语言: TypeScript
项目地址: git://github.com/philschatz/vscode-xslt.git
创建时间: 2020-03-31T01:01:59Z
项目社区:https://github.com/philschatz/vscode-xslt

开源协议:

下载


XSLT Debugger for VSCode

xslt-debugger

This debugger allows you to set breakpoints in the XSL file and the source XML document. If a breakpoint is set in the source XML document then every template that matches the breakpoint will pause.

Steps to run

  1. Make sure java is installed and available in the current path
  2. Create a launch config.json that contains something like the following in it (replace the my_ files with yours)
  3. Press Play in the Run panel
  1. {
  2. "configurations": [
  3. {
  4. "type": "xslt",
  5. "request": "launch",
  6. "name": "Debug XSLT File",
  7. "xslPath": "${workspaceFolder}/my_transform.xsl",
  8. "sourcePath": "${workspaceFolder}/my_input.xml",
  9. "destinationPath": "${workspaceFolder}/my_output.xml",
  10. "parameters": {
  11. "theseAreOptional": true,
  12. "andCanBeOmmittedIfYou": "do not use them"
  13. }
  14. }
  15. ]
  16. }

Windows Users

Users of Windows Subsystem for Linux (WSL) have reported problems with breakpoints. Installing OpenJDK 11+ seems to fix the problem.

  1. WSL: sudo apt install default-jre
  2. js@JS-DESKTOP:/mnt/d/Temp/psh/xslt_debug$ java -version
  3. openjdk version "11.0.13" 2021-10-19
  4. OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.18.04)
  5. OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
  6. Success: hits Breakpoint!

Local Development

  1. Run npm install in this repo
  2. Run ./prebuild.bash to make sure the XSLT jar is available (from xslt-debug-adapter)
  3. Open up the repo in VSCode and press F5 to start a development instance of VSCode
  4. Open a directory in the dev VSCode with an XSLT file and an input XML file
  5. Create a launch config.json as shown above and press Run