thomasmeschke/call-sequencer

A simple tool that allows to convert xdebug trace files into plantUML sequence diagrams

v0.3 2025-08-01 12:07 UTC

This package is auto-updated.

Last update: 2025-08-04 09:13:52 UTC


README

Packagist Version GitHub branch check runs

Call-Sequencer

Simple tool that allows to convert xdebug trace files into plantUML sequence diagrams.

Installation

You can include this tool into your project using composer:

composer require --dev thomasmeschke/call-sequencer

Usage:

php cseq.php -i<inputfile> -o<outputfile> [-c<optionsfile>]

The options are as follows:

-i<inputfile>    required  The xdebug trace file to process
-o<outputfile>   required  The plantUML output file to generate
-c<optionsfile>  optional  A JSON file containing the compiler options

Inputfiles

The tool takes xdebug trace files (*.xt) with the trace-format configured to "3".

Outputfiles

The tool prints files in the PlantUML format. The content can be pasted into the online PlantUML Editor or can be viewed and exportet with tools like the VSCode PlantUML Extension.

Compiler option files

The compiler options JSON file is structured as follows:

{
    "basePath": "",
    "cutOffNamespaces": [],
    "replaceOptions": {
    }
}

basePath(string): Path segment to be removed from absolute paths, e.g. the projects root path. This gets removed from all absolute paths, like include paths.

cutOffNamespace(array): List of namespaces that the diagram will not follow into, e.g. the used frameworks base namespace. Only the first stackframe inside these namespaces will be included in every callstack.

replaceOptions(object): A collection of keys and string values, specifying which string is to be replace with which. Can be used to redact sensitive information like company names from the resulting diagram.

Planned features

The future might bring additional features like the possibility to choose the input trace file format via CLI parameter, as well as other output formats like flame charts.