• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / roku-debug / #2026

02 Nov 2022 02:41PM UTC coverage: 56.194% (+7.0%) from 49.18%
#2026

push

TwitchBronBron
0.17.0

997 of 1898 branches covered (52.53%)

Branch coverage included in aggregate %.

2074 of 3567 relevant lines covered (58.14%)

15.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.22
/src/debugProtocol/Constants.ts
1
export enum PROTOCOL_ERROR_CODES {
1✔
2
    NOT_TESTED = 0,
1✔
3
    SUPPORTED = 1,
1✔
4
    NOT_SUPPORTED = 2
1✔
5
}
6

7
export enum COMMANDS {
1✔
8
    STOP = 1,
1✔
9
    CONTINUE = 2,
1✔
10
    THREADS = 3,
1✔
11
    STACKTRACE = 4,
1✔
12
    VARIABLES = 5,
1✔
13
    STEP = 6, // Since protocol 1.1
1✔
14
    ADD_BREAKPOINTS = 7, // since protocol 1.2
1✔
15
    LIST_BREAKPOINTS = 8, // since protocol 1.2
1✔
16
    REMOVE_BREAKPOINTS = 9, // since protocol 1.2
1✔
17
    EXECUTE = 10, // since protocol 2.1
1✔
18
    ADD_CONDITIONAL_BREAKPOINTS = 11, // since protocol 3.1
1✔
19
    EXIT_CHANNEL = 122
1✔
20
}
21

22
export enum STEP_TYPE {
1✔
23
    STEP_TYPE_NONE = 0,
1✔
24
    STEP_TYPE_LINE = 1,
1✔
25
    STEP_TYPE_OUT = 2,
1✔
26
    STEP_TYPE_OVER = 3
1✔
27
}
28

29
//#region RESPONSE CONSTS
30
export enum ERROR_CODES {
1✔
31
    OK = 0,
1✔
32
    OTHER_ERR = 1,
1✔
33
    UNDEFINED_COMMAND = 2,
1✔
34
    CANT_CONTINUE = 3,
1✔
35
    NOT_STOPPED = 4,
1✔
36
    INVALID_ARGS = 5
1✔
37
}
38

39
export enum STOP_REASONS {
1✔
40
    UNDEFINED = 0,
1✔
41
    NOT_STOPPED = 1,
1✔
42
    NORMAL_EXIT = 2,
1✔
43
    STOP_STATEMENT = 3,
1✔
44
    BREAK = 4,
1✔
45
    RUNTIME_ERROR = 5
1✔
46
}
47

48
export enum UPDATE_TYPES {
1✔
49
    UNDEF = 0,
1✔
50
    IO_PORT_OPENED = 1, // client needs to connect to port to retrieve channel output
1✔
51
    ALL_THREADS_STOPPED = 2,
1✔
52
    THREAD_ATTACHED = 3,
1✔
53
    /**
54
     * A compilation or runtime error occurred when evaluating the cond_expr of a conditional breakpoint
55
     * @since protocol 3.1
56
     */
57
    BREAKPOINT_ERROR = 4,
1✔
58
    /**
59
     * A compilation error occurred
60
     * @since protocol 3.1
61
     */
62
    COMPILE_ERROR = 5
1✔
63
}
64

65
export enum VARIABLE_REQUEST_FLAGS {
1✔
66
    GET_CHILD_KEYS = 0x01,
1✔
67
    CASE_SENSITIVITY_OPTIONS = 0x02
1✔
68
}
69

70
export enum VARIABLE_FLAGS {
1✔
71
    /**
72
     * value is a child of the requested variable
73
     * e.g., an element of an array or field of an AA
74
     */
75
    isChildKey = 0x01,
1✔
76
    /**
77
     * value is constant
78
     */
79
    isConst = 0x02,
1✔
80
    /**
81
     * The referenced value is a container (e.g., a list or array)
82
     */
83
    isContainer = 0x04,
1✔
84
    /**
85
     * The name is included in this VariableInfo
86
     */
87
    isNameHere = 0x08,
1✔
88
    /**
89
     * value is reference-counted.
90
     */
91
    isRefCounted = 0x10,
1✔
92
    /**
93
     * value is included in this VariableInfo
94
     */
95
    isValueHere = 0x20,
1✔
96
    /**
97
     * Value is container, key lookup is case sensitive
98
     * @since protocol 3.1.0
99
     */
100
    isKeysCaseSensitive = 0x40
1✔
101
}
102

103
export enum VARIABLE_TYPES {
1✔
104
    AA = 1,
1✔
105
    Array = 2,
1✔
106
    Boolean = 3,
1✔
107
    Double = 4,
1✔
108
    Float = 5,
1✔
109
    Function = 6,
1✔
110
    Integer = 7,
1✔
111
    Interface = 8,
1✔
112
    Invalid = 9,
1✔
113
    List = 10,
1✔
114
    Long_Integer = 11,
1✔
115
    Object = 12,
1✔
116
    String = 13,
1✔
117
    Subroutine = 14,
1✔
118
    Subtyped_Object = 15,
1✔
119
    Uninitialized = 16,
1✔
120
    Unknown = 17
1✔
121
}
122
//#endregion
123

124
export function getUpdateType(value: number): UPDATE_TYPES {
1✔
125
    switch (value) {
×
126
        case UPDATE_TYPES.ALL_THREADS_STOPPED:
127
            return UPDATE_TYPES.ALL_THREADS_STOPPED;
×
128
        case UPDATE_TYPES.IO_PORT_OPENED:
129
            return UPDATE_TYPES.IO_PORT_OPENED;
×
130
        case UPDATE_TYPES.THREAD_ATTACHED:
131
            return UPDATE_TYPES.THREAD_ATTACHED;
×
132
        case UPDATE_TYPES.UNDEF:
133
            return UPDATE_TYPES.UNDEF;
×
134
        default:
135
            return UPDATE_TYPES.UNDEF;
×
136
    }
137
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc