Skip to content

Commit

Permalink
Create debugger_const.go
Browse files Browse the repository at this point in the history
  • Loading branch information
saibing authored Oct 25, 2023
1 parent 56903a0 commit d5fb80b
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions debugger_const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
package goja

import "errors"

type StepState int

const (
DebuggerInit StepState = 0

Check failure on line 8 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

only the first constant in this group has an explicit type (SA9004)

Check failure on line 8 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

only the first constant in this group has an explicit type (SA9004)
DebuggerStep = 1
DebuggerStepIn = 2
DebuggerStepOut = 3
DebuggerStepContinue = 4
DebuggerStepStop = 5
)

type MessageKeyType = string

const (
TypeKey MessageKeyType = "type"

Check failure on line 19 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

only the first constant in this group has an explicit type (SA9004)

Check failure on line 19 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

only the first constant in this group has an explicit type (SA9004)
EventKey = "event"
RequestKey = "request"
ReasonKey = "reason"
ThreadKey = "thread"
PathKey = "path"
DirtyKey = "dirty"
BreakpointsKey = "breakpoints"
CommandKey = "command"
ArgsKey = "args"
ExpressionKey = "expression"
ResultKey = "result"
LineKey = "line"
ColumnKey = "column"
VariablesReferenceKey = "variablesReference"
ResponseKey = "response"
BodyKey = "body"
RequestSeqKey = "request_seq"
FrameIDKey = "frameId"
)

const (
EventType = "event"
ResponseType = "response"
)

type CommandType = string

const (
ContinueCommand CommandType = "continue"

Check failure on line 48 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

only the first constant in this group has an explicit type (SA9004)

Check failure on line 48 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

only the first constant in this group has an explicit type (SA9004)
PauseCommand = "pause"
NextCommand = "next"
StepIntoCommand = "stepInto"
StepInCommand = "stepIn"
StepOutCommand = "stepOut"
EvaluateCommand = "evaluate"
StackTraceCommand = "stackTrace"
ScopesCommand = "scopes"
VariablesCommand = "variables"
StopCommand = "stop"
)

type MessageType = string

const (
RequestMessage MessageType = "request"

Check failure on line 64 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

only the first constant in this group has an explicit type (SA9004)

Check failure on line 64 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

only the first constant in this group has an explicit type (SA9004)
ContinueMessage = "continue"
BreakpointsMessage = "breakpoints"
StopOnExceptionType = "stopOnException"
)

type EventReasonType = string

const (
StepInReason EventReasonType = "stepIn"

Check failure on line 73 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

only the first constant in this group has an explicit type (SA9004)

Check failure on line 73 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

only the first constant in this group has an explicit type (SA9004)
StepOutReason = "stepOut"
BreakpointReason = "breakpoint"
StepReason = "step"
EntryReason = "entry"
PauseReason = "pause"
)

const (
TerminatedEvent = "terminated"
StoppedEvent = "StoppedEvent"
)

const (
stackID = "id"

Check failure on line 87 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

const stackID is unused (U1000)

Check failure on line 87 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

const stackID is unused (U1000)
stackName = "name"

Check failure on line 88 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

const stackName is unused (U1000)

Check failure on line 88 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

const stackName is unused (U1000)
stackFilename = "filename"

Check failure on line 89 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

const stackFilename is unused (U1000)

Check failure on line 89 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

const stackFilename is unused (U1000)
stackLine = "line"

Check failure on line 90 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

const stackLine is unused (U1000)

Check failure on line 90 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

const stackLine is unused (U1000)
)

const (
scopeName = "name"

Check failure on line 94 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest)

const scopeName is unused (U1000)

Check failure on line 94 in debugger_const.go

View workflow job for this annotation

GitHub Actions / test (1.x, ubuntu-latest, 386)

const scopeName is unused (U1000)
scopeReference = "reference"
scopeExpensive = "expensive"

localScope = "Local"
globalScope = "Global"
closureScope = "Closure"
)

const (
filterKey = "filter"
indexedKey = "indexed"
startKey = "start"
countKey = "count"
)

const (
variableNameKey = "name"
variableValueKey = "value"
indexedVariablesKey = "indexedVariables"
)

const (
undefinedType = "undefined"
stringType = "string"
integerType = "integer"
booleanType = "boolean"
floatType = "float"
objectType = "object"
)

var errDebugCanceled = errors.New("debugger is canceled by client")

0 comments on commit d5fb80b

Please sign in to comment.