rk cdp

Summary

Chrome DevTools Protocol debugging for Roku devices (server mode only).

Description

Chrome DevTools Protocol debugging for Roku devices (server mode only).

Usage

rk cdp <subcommand> [options]

Examples

rk cdp status
rk cdp session create --root .
rk cdp eval "1 + 1"
rk cdp break set src/main.js 42
rk cdp debugger pause
rk cdp profile start --hz 200 --duration 5000
rk cdp heap snapshot --output heap-123.heapsnapshot
rk cdp heap sampling-start --interval 16384 --output custom.heapprofile
rk cdp heap sampling-stop

eval

Summary

Evaluate a JavaScript expression

Description

Evaluate a JavaScript expression

Usage

rk cdp eval <expr> [options]
ArgumentDescriptionRequiredRepeatable
exprJavaScript expression to evaluate; multiple words are joined into one expression.yesyes

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

status

Summary

Show active session status

Description

Show active session status

Usage

rk cdp status [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

session create

Summary

Create a new debugging session

Description

Create a new debugging session

Usage

rk cdp session create --root <path> [options]

Options

FlagValue/typeAllowed valuesDefaultRequired
--rootpath (string)——no
--deviceid (string)——no
--hostip (string)——no
--passwordpwd (string)——no
--modewatch|manual (string)watch, manualwatchno
--jsonboolean——no

--root

Project root for 'session create' (required)

--device

Target device for 'session create', or rce:<name>

Example:

rk cdp session create --root . --device rce:living-room

--host

Target device IP for 'session create'

--password

Device password for 'session create'/'session update'

--mode

Build mode for 'session create'

--json

Output raw JSON response

See also

session update

Summary

Update an active session

Description

Update an active session

Usage

rk cdp session update [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--passwordpwd (string)no
--jsonbooleanno

--session

Target session ID

--password

Device password for 'session create'/'session update'

--json

Output raw JSON response

See also

session end

Summary

End an active session

Description

End an active session

Usage

rk cdp session end [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

heap

Summary

Get heap usage statistics

Description

Get heap usage statistics

Usage

rk cdp heap [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

heap snapshot

Summary

Capture a heap snapshot to a .heapsnapshot file

Description

Capture a heap snapshot to a .heapsnapshot file

Usage

rk cdp heap snapshot [options]

Options

FlagValue/typeRequired
--outputpath (string)no
--sessionid (string)no
--jsonbooleanno

--output

Output file path for 'profile start'/'heap snapshot'/'heap sampling-start' (within project root)

--session

Target session ID

--json

Output raw JSON response

See also

heap sampling-start

Summary

Start a lightweight heap allocation sampling capture

Description

Start a lightweight heap allocation sampling capture

Usage

rk cdp heap sampling-start [options]

Options

FlagValue/typeDefaultRequired
--intervalbytes (number)32768no
--outputpath (string)—no
--sessionid (string)—no
--jsonboolean—no

--interval

Sampling interval in bytes.

--output

Output file path for 'profile start'/'heap snapshot'/'heap sampling-start' (within project root)

--session

Target session ID

--json

Output raw JSON response

See also

heap sampling-stop

Summary

Stop a heap sampling capture and write the .heapprofile

Description

Stop a heap sampling capture and write the .heapprofile

Usage

rk cdp heap sampling-stop [options]

Options

FlagValue/typeRequired
--capture-idid (string)no
--sessionid (string)no
--jsonbooleanno

--capture-id

Target capture ID (active capture if omitted).

--session

Target session ID

--json

Output raw JSON response

See also

source list

Summary

List all loaded source files

Description

List all loaded source files

Usage

rk cdp source list [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

source get

Summary

Get source code for a file

Description

Get source code for a file

Usage

rk cdp source get <file> [options]
ArgumentDescriptionRequiredRepeatable
fileSource file to get.yesno

Options

FlagValue/typeRequired
--startline (number)no
--endline (number)no
--sessionid (string)no
--jsonbooleanno

--start

Start line for 'source get'

--end

End line for 'source get'

--session

Target session ID

--json

Output raw JSON response

See also

source grep

Summary

Search source files for a pattern

Description

Search source files for a pattern

Usage

rk cdp source grep <pattern> [options]
ArgumentDescriptionRequiredRepeatable
patternPattern to search source files for.yesno

Options

FlagValue/typeRequired
--filepath (string)no
--max-resultsn (number)no
--sessionid (string)no
--jsonbooleanno

--file

Restrict 'source grep' to a single file

--max-results

Limit results for 'source grep'

--session

Target session ID

--json

Output raw JSON response

See also

source resolve

Summary

Resolve a source map path

Description

Resolve a source map path

Usage

rk cdp source resolve <path> [options]
ArgumentDescriptionRequiredRepeatable
pathSource map path to resolve.yesno

Options

FlagValue/typeAllowed valuesDefaultRequired
--directionto-local|to-source-map (string)to-local, to-source-mapto-localno
--sessionid (string)——no
--jsonboolean——no

--direction

Resolution direction.

--session

Target session ID

--json

Output raw JSON response

See also

break set

Summary

Set a breakpoint

Description

Set a breakpoint

Usage

rk cdp break set <file> <line> [options]
ArgumentDescriptionRequiredRepeatable
fileSource file for the breakpoint.yesno
lineLine number for the breakpoint (positive integer).yesno

Options

FlagValue/typeRequired
--conditionexpr (string)no
--sessionid (string)no
--jsonbooleanno

--condition

Conditional breakpoint expression for 'break set'

--session

Target session ID

--json

Output raw JSON response

See also

break remove

Summary

Remove a breakpoint by ID

Description

Remove a breakpoint by ID

Usage

rk cdp break remove <id> [options]
ArgumentDescriptionRequiredRepeatable
idBreakpoint ID to remove.yesno

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

break list

Summary

List all breakpoints

Description

List all breakpoints

Usage

rk cdp break list [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger pause

Summary

Pause execution

Description

Pause execution

Usage

rk cdp debugger pause [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger resume

Summary

Resume execution

Description

Resume execution

Usage

rk cdp debugger resume [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger step-over

Summary

Step over the next statement

Description

Step over the next statement

Usage

rk cdp debugger step-over [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger step-into

Summary

Step into the next function call

Description

Step into the next function call

Usage

rk cdp debugger step-into [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger step-out

Summary

Step out of the current function

Description

Step out of the current function

Usage

rk cdp debugger step-out [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger state

Summary

Get current debugger state

Description

Get current debugger state

Usage

rk cdp debugger state [options]

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

debugger eval-frame

Summary

Evaluate an expression in a stack frame

Description

Evaluate an expression in a stack frame

Usage

rk cdp debugger eval-frame <callFrameId> <expression> [options]
ArgumentDescriptionRequiredRepeatable
callFrameIdCall frame ID to evaluate in.yesno
expressionExpression to evaluate; multiple words are joined into one expression.yesyes

Options

FlagValue/typeRequired
--sessionid (string)no
--jsonbooleanno

--session

Target session ID

--json

Output raw JSON response

See also

profile start

Summary

Start a CPU profiling capture

Description

Start a CPU profiling capture

Usage

rk cdp profile start [options]

Options

FlagValue/typeDefaultRequired
--hzn (number)100no
--durationms (number)—no
--outputpath (string)—no
--sessionid (string)—no
--jsonboolean—no

--hz

Sampling frequency in Hz for 'profile start'

--duration

Auto-stop after this many milliseconds for 'profile start'

--output

Output file path for 'profile start'/'heap snapshot'/'heap sampling-start' (within project root)

--session

Target session ID

--json

Output raw JSON response

See also

profile stop

Summary

Stop a CPU profiling capture and write the .cpuprofile

Description

Stop a CPU profiling capture and write the .cpuprofile

Usage

rk cdp profile stop [options]

Options

FlagValue/typeRequired
--capture-idid (string)no
--sessionid (string)no
--jsonbooleanno

--capture-id

Target capture ID (active capture if omitted).

--session

Target session ID

--json

Output raw JSON response

See also

console

Summary

Get buffered console output

Description

Get buffered console output

Usage

rk cdp console [options]

Options

FlagValue/typeAllowed valuesDefaultRequired
--levellevel (string)log, debug, info, error, warning, dir, dirxml, table, trace, clear, startGroup, startGroupCollapsed, endGroup, assert, profile, profileEnd, count, timeEnd—no
--limitn (number)—50no
--sincems (number)——no
--sessionid (string)——no
--jsonboolean——no

--level

Filter by level.

--limit

Max entries to return for 'console'/'errors'

--since

Only entries newer than this timestamp for 'console'/'errors'

--session

Target session ID

--json

Output raw JSON response

See also

console clear

Summary

Clear console/error buffers

Description

Clear console/error buffers

Usage

rk cdp console clear [options]

Options

FlagValue/typeRequired
--console-onlybooleanno
--errors-onlybooleanno
--sessionid (string)no
--jsonbooleanno

--console-only

Clear only the console buffer for 'console clear'

--errors-only

Clear only the error buffer for 'console clear'

--session

Target session ID

--json

Output raw JSON response

See also

errors

Summary

Get buffered error messages

Description

Get buffered error messages

Usage

rk cdp errors [options]

Options

FlagValue/typeDefaultRequired
--limitn (number)50no
--sincems (number)—no
--sessionid (string)—no
--jsonboolean—no

--limit

Max entries to return for 'console'/'errors'

--since

Only entries newer than this timestamp for 'console'/'errors'

--session

Target session ID

--json

Output raw JSON response

See also


Did this page help you?