Skip to content

Tag reference

@psalm-trace

The @psalm-trace tag outputs the inferred type of the given variable, for debugging purposes.

Grammar

"@psalm-trace" <Variable> [ <Description> ]

Examples

Inspecting the type Psalm infers for a variable.
/**
* @psalm-trace $result
*/

Names by platform

psalm
@psalm-trace

Parsing a @psalm-trace tag produces a PsalmTraceTag instance, carrying the traced $variable alongside the $name and optional $description every Tag already provides.

final class PsalmTraceTag extends VariableTag {}

See Psalm’s supported annotations.