PtcRunner.ViewerFrontend (PtcRunner v0.14.0)

Copy Markdown View Source

Serves one project's captured traces through the local PTC Viewer.

ptc viewer ptc-project.json
ptc viewer ptc-project.json --port 4123
ptc viewer ptc-project.json --listen 0.0.0.0
ptc viewer ptc-project.json --env-file .env

The project must enable trace artifacts. The trace root, optional inspection root, port, browser-opening preference, analysis-REPL setting, and private-data grant all come from the named project document; there is no implicit project discovery and no separate Viewer path grammar.

The command binds loopback unless --listen 0.0.0.0 is given. That address publishes an unauthenticated trace browser — which can display private inspection records when the project grants them — to every host that can reach the port, so it is never reached by default and never inferred. Inside a container it is the only address a published port can forward to; the host exposure decision moves to the docker run -p 127.0.0.1: prefix, which the operator must write.

The Viewer is an optional companion. It ships in the assembled release and the container image, and is absent from the Hex package, where this command reports viewer_unavailable rather than failing obscurely.

The command runs in the foreground until the Viewer stops or the process is signalled; SIGINT and SIGTERM both end it cleanly.

Summary

Types

start_error()

@type start_error() :: atom() | {:viewer_port_in_use, 1..65535, binary() | nil}

Functions

run(arguments, runtime)