Skip to content
ConsoleMonster
Cmdlet

Show-ConsoleReplay

Module
ConsoleMonster

Rewinds a recorded run: an in-terminal player with a timeline, markers, failures, warnings and log search.

Syntax

Show-ConsoleReplay
[-AutoPlay]
[-Dashboard] <IWidget>
[-FramesPerSecond <Double>]
[-Height <Int32>]
[-Inline]
[-MaxFrames <Int32>]
[-PlaybackMode <Interactive|Automatic>]
[[-RecordingPath] <String>]
[-Speed <Double>]
[-Title <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Plays a dashboard recording created with RecordingPath or AutoRecord on Invoke-ConsoleDashboard. Without RecordingPath, it uses the newest automatic recording.

Replay player -------------

The player displays the reconstructed dashboard and a timeline with the recording's markers. Space plays or pauses. Left and Right step through frames, PgUp and PgDn scrub, Home and End jump to the ends, and + or - changes speed. Use n or p for the next or previous marker, f or Shift+F for failures, w or Shift+W for warnings, and l or Shift+L for log entries. Press / to search log text and Enter for the next match. Press q to close the player. Inline places it below the current cursor.

Unattended playback and marker output -------------------------------------

PlaybackMode Automatic replays without reading keys. When interactive playback is requested in a session without an interactive console, the command prints the markers as lines.

Examples

Example 1

# Requires build.jsonl recorded with this dashboard definition.
$dashboardOptions = @{
    Title = 'Build'
    Content = {
        $statusListOptions = @{
            WidgetId = 'steps'
            Content = { 'Compile' }
        }
        New-ConsoleStatusList @statusListOptions
    }
}
$dashboard = New-ConsoleDashboard @dashboardOptions
$replayOptions = @{
    Dashboard = $dashboard
    RecordingPath = './build.jsonl'
}
Show-ConsoleReplay @replayOptions

Play an existing matching dashboard recording

Example 2

# Requires build.jsonl recorded with this dashboard definition.
$dashboardOptions = @{
    Title = 'Build'
    Content = {
        $statusListOptions = @{
            WidgetId = 'steps'
            Content = { 'Compile' }
        }
        New-ConsoleStatusList @statusListOptions
    }
}
$dashboard = New-ConsoleDashboard @dashboardOptions
$replayOptions = @{
    Inline = $true
    AutoPlay = $false
    Dashboard = $dashboard
    RecordingPath = './build.jsonl'
}
Show-ConsoleReplay @replayOptions

Open an existing recording inline and paused. Press Right to step one frame, Space to play or pause, and q to close the player.

Parameters

-AutoPlay SwitchParameter optional
Starts playback immediately; use -AutoPlay:$false to open paused.
-Dashboard IWidget requiredposition: 0
The dashboard (or any widget tree) whose widget names match the recording.
-FramesPerSecond Double optional
Samples the interactive recording at this frame rate; default ten.
-Height Int32 optional
The height of the recorded screen in rows (default the window, or the dashboard's own height inline).
-Inline SwitchParameter optional
Plays below the cursor instead of on the whole window.
-MaxFrames Int32 optional
Maximum sampled interactive frames; default 3000.
-PlaybackMode PlaybackMode optional
Interactive player controls (default), or automatic playback without reading keys.
Possible values: Interactive, Automatic
-RecordingPath String optionalposition: 1
The recording file; default the newest file in the automatic recording folder.
-Speed Double optional
The starting speed, 0.25 to 16 (default 1).
-Title String optional
The run name in the header (default the recorded dashboard title, or the file name for other widget trees). A recorded dashboard's own header and footer are not replayed: its title, subtitle and status show in the player's header.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.