DEV Community

Daniel Jonathan
Daniel Jonathan

Posted on

The XSLT Debugging Problem for Logic Apps Developers

Azure Logic Apps uses XSLT for XML transformations. While the Azure Data Mapper allows basic testing, it lacks true debugging capabilities β€” no message capture, no variable inspection, no execution tracing.


XSLT's Debug Tool: xsl:message

XSLT provides xsl:message for diagnostic logging:

<xsl:message>Processing started</xsl:message>
<xsl:message select="'Found ' || count(//book) || ' books'" />
Enter fullscreen mode Exit fullscreen mode

Messages output to a separate stream without affecting transformation results. However, different processors handle it differently:

.NET (XslCompiledTransform)

transform.XsltMessageEncountered += (sender, e) => {
    Console.WriteLine($"[XSLT] {e.Message}");
};
Enter fullscreen mode Exit fullscreen mode
  • XSLT 1.0 only
  • Event-based capture
  • Silent if no handler registered

πŸ“˜ Microsoft Docs

Saxon (XSLT 2.0/3.0)

transformer.setMessageListener((content, terminate, location) -> {
    System.out.println("[XSLT] " + content);
});
Enter fullscreen mode Exit fullscreen mode
  • XSLT 2.0/3.0 support
  • Listener interface
  • Includes location info

πŸ“˜ Saxonica Docs

Feature .NET Saxon
XSLT Version 1.0 2.0 / 3.0
Location Info ❌ βœ…
select Attribute ❌ βœ…

Existing Tools: Azure Data Mapper

Azure provides the Data Mapper for testing XSLT transformations:

πŸ“˜ Logic Apps Data Mapper - Compiling and Testing

What it does:

  • Run transformations locally
  • View output results

What it doesn't do:

  • No xsl:message capture β€” Can't view debug logs
  • No variable inspection β€” Can't see intermediate values
  • No execution tracing β€” Can't track template calls or logic flow
  • Limited error context β€” Basic error messages without detailed diagnostics

The Debugging Gap

What's still missing for effective XSLT debugging:

  1. Message capture β€” Can't view xsl:message output
  2. Variable inspection β€” Can't see values during execution
  3. Execution tracing β€” Can't understand transformation flow
  4. Rich error diagnostics β€” Need detailed context and line numbers

What's Needed

A proper XSLT debugger for Logic Apps should:

  • Run transformations locally in VS Code
  • Capture and display xsl:message output
  • Support both .NET and Saxon processors
  • Provide fast edit-test cycles
  • Show clear errors with line numbers

This is what the XSLT Debugger extension delivers β€” built on .NET with open-source Saxon to provide debugging capabilities for Logic Apps developers without additional licensing costs.

Top comments (1)

Collapse
 
roshan_sharma_7deae5e0742 profile image
roshan sharma

Great breakdown of the XSLT debugging challenge for Logic Apps! Super clear on the gaps and solutions.