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-stopeval
Summary
Evaluate a JavaScript expression
Description
Evaluate a JavaScript expression
Usage
rk cdp eval <expr> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| expr | JavaScript expression to evaluate; multiple words are joined into one expression. | yes | yes |
Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpEvaluate (
POST /api/cdp/eval) - cdp_eval
status
Summary
Show active session status
Description
Show active session status
Usage
rk cdp status [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpGetStatus (
GET /api/cdp/status) - cdp_status
session create
Summary
Create a new debugging session
Description
Create a new debugging session
Usage
rk cdp session create --root <path> [options]Options
| Flag | Value/type | Allowed values | Default | Required |
|---|---|---|---|---|
--root | path (string) | — | — | no |
--device | id (string) | — | — | no |
--host | ip (string) | — | — | no |
--password | pwd (string) | — | — | no |
--mode | watch|manual (string) | watch, manual | watch | no |
--json | boolean | — | — | 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
- cdpCreateSession (
POST /api/cdp/session/create) - cdp_session_create
session update
Summary
Update an active session
Description
Update an active session
Usage
rk cdp session update [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--password | pwd (string) | no |
--json | boolean | no |
--session
Target session ID
--password
Device password for 'session create'/'session update'
--json
Output raw JSON response
See also
- cdpUpdateSession (
POST /api/cdp/session/update) - cdp_session_update
session end
Summary
End an active session
Description
End an active session
Usage
rk cdp session end [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpEndSession (
POST /api/cdp/session/end) - cdp_session_end
heap
Summary
Get heap usage statistics
Description
Get heap usage statistics
Usage
rk cdp heap [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpGetHeapUsage (
GET /api/cdp/heap-usage) - cdp_heap_usage
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
| Flag | Value/type | Required |
|---|---|---|
--output | path (string) | no |
--session | id (string) | no |
--json | boolean | no |
--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
- cdpTakeHeapSnapshot (
POST /api/cdp/heap/snapshot) - cdp_heap_snapshot
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
| Flag | Value/type | Default | Required |
|---|---|---|---|
--interval | bytes (number) | 32768 | no |
--output | path (string) | — | no |
--session | id (string) | — | no |
--json | boolean | — | 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
- cdpStartHeapSampling (
POST /api/cdp/heap/sampling/start) - cdp_heap_sampling_start
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
| Flag | Value/type | Required |
|---|---|---|
--capture-id | id (string) | no |
--session | id (string) | no |
--json | boolean | no |
--capture-id
Target capture ID (active capture if omitted).
--session
Target session ID
--json
Output raw JSON response
See also
- cdpStopHeapSampling (
POST /api/cdp/heap/sampling/stop) - cdp_heap_sampling_stop
source list
Summary
List all loaded source files
Description
List all loaded source files
Usage
rk cdp source list [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpListSources (
GET /api/cdp/source/list) - cdp_source_list
source get
Summary
Get source code for a file
Description
Get source code for a file
Usage
rk cdp source get <file> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| file | Source file to get. | yes | no |
Options
| Flag | Value/type | Required |
|---|---|---|
--start | line (number) | no |
--end | line (number) | no |
--session | id (string) | no |
--json | boolean | no |
--start
Start line for 'source get'
--end
End line for 'source get'
--session
Target session ID
--json
Output raw JSON response
See also
- cdpGetSource (
GET /api/cdp/source/get) - cdp_source_get
source grep
Summary
Search source files for a pattern
Description
Search source files for a pattern
Usage
rk cdp source grep <pattern> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| pattern | Pattern to search source files for. | yes | no |
Options
| Flag | Value/type | Required |
|---|---|---|
--file | path (string) | no |
--max-results | n (number) | no |
--session | id (string) | no |
--json | boolean | no |
--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
- cdpGrepSources (
GET /api/cdp/source/grep) - cdp_source_grep
source resolve
Summary
Resolve a source map path
Description
Resolve a source map path
Usage
rk cdp source resolve <path> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| path | Source map path to resolve. | yes | no |
Options
| Flag | Value/type | Allowed values | Default | Required |
|---|---|---|---|---|
--direction | to-local|to-source-map (string) | to-local, to-source-map | to-local | no |
--session | id (string) | — | — | no |
--json | boolean | — | — | no |
--direction
Resolution direction.
--session
Target session ID
--json
Output raw JSON response
See also
- cdpResolveSource (
GET /api/cdp/source/resolve) - cdp_source_resolve
break set
Summary
Set a breakpoint
Description
Set a breakpoint
Usage
rk cdp break set <file> <line> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| file | Source file for the breakpoint. | yes | no |
| line | Line number for the breakpoint (positive integer). | yes | no |
Options
| Flag | Value/type | Required |
|---|---|---|
--condition | expr (string) | no |
--session | id (string) | no |
--json | boolean | no |
--condition
Conditional breakpoint expression for 'break set'
--session
Target session ID
--json
Output raw JSON response
See also
- cdpSetBreakpoint (
POST /api/cdp/breakpoint/set) - cdp_breakpoint_set
break remove
Summary
Remove a breakpoint by ID
Description
Remove a breakpoint by ID
Usage
rk cdp break remove <id> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| id | Breakpoint ID to remove. | yes | no |
Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpRemoveBreakpoint (
POST /api/cdp/breakpoint/remove) - cdp_breakpoint_remove
break list
Summary
List all breakpoints
Description
List all breakpoints
Usage
rk cdp break list [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpListBreakpoints (
GET /api/cdp/breakpoint/list) - cdp_breakpoint_list
debugger pause
Summary
Pause execution
Description
Pause execution
Usage
rk cdp debugger pause [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpDebuggerPause (
POST /api/cdp/debugger/pause) - cdp_debugger_pause
debugger resume
Summary
Resume execution
Description
Resume execution
Usage
rk cdp debugger resume [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpDebuggerResume (
POST /api/cdp/debugger/resume) - cdp_debugger_resume
debugger step-over
Summary
Step over the next statement
Description
Step over the next statement
Usage
rk cdp debugger step-over [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpDebuggerStepOver (
POST /api/cdp/debugger/step-over) - cdp_debugger_step_over
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
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpDebuggerStepInto (
POST /api/cdp/debugger/step-into) - cdp_debugger_step_into
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
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpDebuggerStepOut (
POST /api/cdp/debugger/step-out) - cdp_debugger_step_out
debugger state
Summary
Get current debugger state
Description
Get current debugger state
Usage
rk cdp debugger state [options]Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpGetDebuggerState (
GET /api/cdp/debugger/state) - cdp_debugger_state
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]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| callFrameId | Call frame ID to evaluate in. | yes | no |
| expression | Expression to evaluate; multiple words are joined into one expression. | yes | yes |
Options
| Flag | Value/type | Required |
|---|---|---|
--session | id (string) | no |
--json | boolean | no |
--session
Target session ID
--json
Output raw JSON response
See also
- cdpEvaluateOnCallFrame (
POST /api/cdp/debugger/eval-frame) - cdp_debugger_eval_frame
profile start
Summary
Start a CPU profiling capture
Description
Start a CPU profiling capture
Usage
rk cdp profile start [options]Options
| Flag | Value/type | Default | Required |
|---|---|---|---|
--hz | n (number) | 100 | no |
--duration | ms (number) | — | no |
--output | path (string) | — | no |
--session | id (string) | — | no |
--json | boolean | — | 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
- cdpStartCpuProfile (
POST /api/cdp/profile/start) - cdp_profile_start
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
| Flag | Value/type | Required |
|---|---|---|
--capture-id | id (string) | no |
--session | id (string) | no |
--json | boolean | no |
--capture-id
Target capture ID (active capture if omitted).
--session
Target session ID
--json
Output raw JSON response
See also
- cdpStopCpuProfile (
POST /api/cdp/profile/stop) - cdp_profile_stop
console
Summary
Get buffered console output
Description
Get buffered console output
Usage
rk cdp console [options]Options
| Flag | Value/type | Allowed values | Default | Required |
|---|---|---|---|---|
--level | level (string) | log, debug, info, error, warning, dir, dirxml, table, trace, clear, startGroup, startGroupCollapsed, endGroup, assert, profile, profileEnd, count, timeEnd | — | no |
--limit | n (number) | — | 50 | no |
--since | ms (number) | — | — | no |
--session | id (string) | — | — | no |
--json | boolean | — | — | 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
- cdpReadConsole (
GET /api/cdp/console) - cdp_console_read
console clear
Summary
Clear console/error buffers
Description
Clear console/error buffers
Usage
rk cdp console clear [options]Options
| Flag | Value/type | Required |
|---|---|---|
--console-only | boolean | no |
--errors-only | boolean | no |
--session | id (string) | no |
--json | boolean | no |
--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
- cdpClearConsoleAndErrors (
POST /api/cdp/console/clear) - cdpClearConsole (
POST /api/cdp/console/clear-console) - cdpClearErrors (
POST /api/cdp/console/clear-errors) - cdp_console_clear
- cdp_console_clear_console
- cdp_console_clear_errors
errors
Summary
Get buffered error messages
Description
Get buffered error messages
Usage
rk cdp errors [options]Options
| Flag | Value/type | Default | Required |
|---|---|---|---|
--limit | n (number) | 50 | no |
--since | ms (number) | — | no |
--session | id (string) | — | no |
--json | boolean | — | 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
- cdpReadErrors (
GET /api/cdp/errors) - cdp_errors_read
Updated about 5 hours ago