rk debug

Summary

Unified CDP+DAP debug session commands for Roku devices (server mode only).

Description

Unified debug session commands require a running rk server. Start it with 'rk server'.

Usage

rk debug <subcommand> [options]

session create

Summary

Create a new unified debug session

Description

Create a new unified debug session

Usage

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

Options

FlagValue/typeAllowed valuesDefaultRequired
--rootpath (string)——yes
--modecdp_only|dap_only|unified (string)cdp_only, dap_only, unified—no
--deviceid (string)——no
--hostip (string)——no
--passwordpwd (string)——no
--configname (string)——no
--connection-modewatch|manual (string)watch, manualwatchno
--coordinated-stopboolean——no
--resume-on-endboolean——no
--auto-stopboolean——no
--jsonboolean——no

--root

Project root for 'session create' (required)

--mode

Backend mode for 'session create'/'session update'

--device

Target device for 'session create'

--host

Target device IP for 'session create'

--password

Device password for 'session create'

--config

Config name for 'session create'

--connection-mode

Reconnect behavior for 'session create': 'watch' auto-reconnects if the connection drops, 'manual' does not

--coordinated-stop

Enable coordinated stop for 'session create'/'session update'

--resume-on-end

Resume execution when 'session create' ends

--auto-stop

Halt the app automatically for 'session create'

--json

Output raw JSON response

Examples

rk debug session create --root . --mode unified

See also

session update

Summary

Update an active debug session

Description

Update an active debug session

Usage

rk debug session update [options]

Options

FlagValue/typeAllowed valuesRequired
--sessionid (string)—no
--modecdp_only|dap_only|unified (string)cdp_only, dap_only, unifiedno
--coordinated-stopboolean—no
--rebuildboolean—no
--jsonboolean—no

--session

Target session ID

--mode

Backend mode for 'session create'/'session update'

--coordinated-stop

Enable coordinated stop for 'session create'/'session update'

--rebuild

Rebuild and reapply breakpoints for 'session update'

--json

Output raw JSON response

See also

session end

Summary

End an active debug session

Description

End an active debug session

Usage

rk debug session end [options]

Options

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

--session

Target session ID

--continue-first

Continue execution before ending for 'session end'

--json

Output raw JSON response

See also

session status

Summary

Show active debug session status

Description

Show active debug session status

Usage

rk debug session status [options]

Options

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

--session

Target session ID

--json

Output raw JSON response

Examples

rk debug session status

See also

stacktrace

Summary

Get the current call stack

Description

Get the current call stack

Usage

rk debug stacktrace [options]

Options

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

--session

Target session ID

--thread

Target thread ID

--json

Output raw JSON response

See also

state

Summary

Get combined CDP+DAP debugger state

Description

Get combined CDP+DAP debugger state

Usage

rk debug state [options]

Options

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

--session

Target session ID

--json

Output raw JSON response

See also

eval

Summary

Evaluate an expression

Description

Evaluate an expression

Usage

rk debug eval <expr> [options]
ArgumentDescriptionRequiredRepeatable
exprExpression to evaluate. Multiple arguments are joined with spaces into one expression.yesyes

Options

FlagValue/typeAllowed valuesRequired
--runtimetypescript|brightscript (string)typescript, brightscriptno
--frame-indexn (number)—no
--threadid (string)—no
--printboolean—no
--sessionid (string)—no
--jsonboolean—no

--runtime

Backend to target for 'eval'/'continue'/'step'

--frame-index

Stack frame index

--thread

Target thread ID

--print

Print BrightScript eval result to the device console

--session

Target session ID

--json

Output raw JSON response

Examples

rk debug eval "1 + 1" --runtime typescript

See also

breakpoint set

Summary

Set a line breakpoint

Description

Set a line breakpoint

Usage

rk debug breakpoint set <file> <line> [options]
ArgumentDescriptionRequiredRepeatable
fileFile to set the line breakpoint in.yesno
lineLine to set the line breakpoint at; must be a positive integer.yesno

Options

FlagValue/typeRequired
--conditionexpr (string)no
--ignore-countn (number)no
--sessionid (string)no
--jsonbooleanno

--condition

Conditional breakpoint expression for 'breakpoint set'

--ignore-count

Ignore count for 'breakpoint set'

--session

Target session ID

--json

Output raw JSON response

Examples

rk debug breakpoint set src/main.brs 42

See also

breakpoint remove

Summary

Remove a breakpoint by ID

Description

Remove a breakpoint by ID

Usage

rk debug breakpoint remove <id> [options]
ArgumentDescriptionRequiredRepeatable
idID of the breakpoint to remove.yesno

Options

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

--session

Target session ID

--json

Output raw JSON response

See also

breakpoints list

Summary

List all breakpoints

Description

List all breakpoints

Usage

rk debug breakpoints list [options]

Options

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

--session

Target session ID

--json

Output raw JSON response

See also

exception-breakpoints set

Summary

Set exception breakpoint filters

Description

Set exception breakpoint filters

Usage

rk debug exception-breakpoints set [options]

Options

FlagValue/typeRequired
--caughtbooleanno
--caught-conditionexpr (string)no
--uncaughtbooleanno
--uncaught-conditionexpr (string)no
--sessionid (string)no
--jsonbooleanno

--caught

Break on caught exceptions for 'exception-breakpoints set'

--caught-condition

Condition for caught exceptions

--uncaught

Break on uncaught exceptions for 'exception-breakpoints set'

--uncaught-condition

Condition for uncaught exceptions

--session

Target session ID

--json

Output raw JSON response

See also

continue

Summary

Resume execution

Description

Resume execution

Usage

rk debug continue [options]

Options

FlagValue/typeAllowed valuesRequired
--runtimetypescript|brightscript (string)typescript, brightscriptno
--sessionid (string)—no
--jsonboolean—no

--runtime

Backend to target for 'eval'/'continue'/'step'

--session

Target session ID

--json

Output raw JSON response

Examples

rk debug continue

See also

step

Summary

Step execution

Description

Step execution

Usage

rk debug step over|into|out [options]
ArgumentDescriptionRequiredRepeatable
over|into|outHow to step: over, into or out.yesno

Options

FlagValue/typeAllowed valuesRequired
--threadid (string)—no
--runtimetypescript|brightscript (string)typescript, brightscriptno
--sessionid (string)—no
--jsonboolean—no

--thread

Target thread ID

--runtime

Backend to target for 'eval'/'continue'/'step'

--session

Target session ID

--json

Output raw JSON response

See also

stop

Summary

Stop (pause) execution

Description

Stop (pause) execution

Usage

rk debug stop [options]

Options

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

--session

Target session ID

--json

Output raw JSON response

See also

console

Summary

Get buffered console output

Description

Get buffered console output

Usage

rk debug console [options]

Options

FlagValue/typeAllowed valuesDefaultRequired
--sourcets|brs|device (string)ts, brs, device—no
--levellevel (string)log, warn, error, info, debug, print—no
--limitn (number)—50no
--sincems (number)——no
--sessionid (string)——no
--jsonboolean——no

--source

Backend to filter by for 'console'/'console clear'/'errors'

--level

Filter 'console' 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 debug console clear [options]

Options

FlagValue/typeAllowed valuesDefaultRequired
--targetconsole|errors|both (string)console, errors, bothbothno
--sourcets|brs|device (string)ts, brs, device—no
--sessionid (string)——no
--jsonboolean——no

--target

Buffer(s) to clear for 'console clear'

--source

Backend to filter by for 'console'/'console clear'/'errors'

--session

Target session ID

--json

Output raw JSON response

See also

errors

Summary

Get buffered error messages

Description

Get buffered error messages

Usage

rk debug errors [options]

Options

FlagValue/typeAllowed valuesDefaultRequired
--sourcets|brs|device (string)ts, brs, device—no
--limitn (number)—50no
--sincems (number)——no
--sessionid (string)——no
--jsonboolean——no

--source

Backend to filter by for 'console'/'console clear'/'errors'

--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?