@@ -71,6 +71,7 @@ module DAP.Types
71
71
, StartMethod (.. )
72
72
, EvaluateArgumentsContext (.. )
73
73
, PathFormat (.. )
74
+ , StackFrame (.. )
74
75
-- * Command
75
76
, Command (.. )
76
77
-- * Event
@@ -397,13 +398,13 @@ data Source
397
398
-- has a name.
398
399
-- When sending a source to the debug adapter this name is optional.
399
400
--
400
- , sourcePath :: Text
401
+ , sourcePath :: Maybe Text
401
402
-- ^
402
403
-- The path of the source to be shown in the UI.
403
404
-- It is only used to locate and load the content of the source if no
404
405
-- `sourceReference` is specified (or its value is 0).
405
406
--
406
- , sourceReference :: Maybe Int
407
+ , sourceSourceReference :: Maybe Int
407
408
-- ^
408
409
-- If the value > 0 the contents of the source must be retrieved through the
409
410
-- `source` request (even if a path is specified).
@@ -423,18 +424,18 @@ data Source
423
424
-- The origin of this source. For example, 'internal module', 'inlined content
424
425
-- from source map', etc.
425
426
--
426
- , sourceSources :: [Source ]
427
+ , sourceSources :: Maybe [Source ]
427
428
-- ^
428
429
-- A list of sources that are related to this source. These may be the source
429
430
-- that generated this source.
430
431
--
431
- , sourceAdapterData :: Value
432
+ , sourceAdapterData :: Maybe Value
432
433
-- ^
433
434
-- Additional data that a debug adapter might want to loop through the client.
434
435
-- The client should leave the data intact and persist it across sessions. The
435
436
-- client should not interpret the data.
436
437
--
437
- , sourceChecksums :: [Checksum ]
438
+ , sourceChecksums :: Maybe [Checksum ]
438
439
-- ^
439
440
-- The checksums associated with this file.
440
441
--
@@ -517,7 +518,7 @@ data StackFrame
517
518
-- ^
518
519
-- The name of the stack frame, typically a method name.
519
520
--
520
- , stackFrameSource :: Source
521
+ , stackFrameSource :: Maybe Source
521
522
-- ^
522
523
-- The source of the frame.
523
524
--
@@ -613,23 +614,23 @@ defaultCapabilities = capabilities
613
614
, supportsEvaluateForHovers = False
614
615
, exceptionBreakpointFilters = []
615
616
, supportsStepBack = False
616
- , supportsSetVariable = False
617
+ , supportsSetVariable = True
617
618
, supportsRestartFrame = False
618
619
, supportsGotoTargetsRequest = False
619
620
, supportsStepInTargetsRequest = False
620
621
, supportsCompletionsRequest = False
621
622
, completionTriggerCharacters = []
622
- , supportsModulesRequest = False
623
+ , supportsModulesRequest = True
623
624
, additionalModuleColumns = []
624
625
, supportedChecksumAlgorithms = []
625
626
, supportsRestartRequest = False
626
627
, supportsExceptionOptions = False
627
- , supportsValueFormattingOptions = False
628
+ , supportsValueFormattingOptions = True
628
629
, supportsExceptionInfoRequest = False
629
630
, supportTerminateDebuggee = False
630
631
, supportSuspendDebuggee = False
631
632
, supportsDelayedStackTraceLoading = False
632
- , supportsLoadedSourcesRequest = False
633
+ , supportsLoadedSourcesRequest = True
633
634
, supportsLogPoints = False
634
635
, supportsTerminateThreadsRequest = False
635
636
, supportsSetExpression = False
@@ -1230,7 +1231,7 @@ data Scope
1230
1231
-- ^
1231
1232
-- The source for this scope.
1232
1233
--
1233
- , line :: Int
1234
+ , line :: Maybe Int
1234
1235
-- ^
1235
1236
-- The start line of the range covered by this scope.
1236
1237
--
@@ -1257,7 +1258,7 @@ instance ToJSON Scope where
1257
1258
= object
1258
1259
[ " name" .= scopeName
1259
1260
, " presentationHint" .= presentationHint
1260
- , " variableReference " .= variablesReference
1261
+ , " variablesReference " .= variablesReference
1261
1262
, " namedVariables" .= namedVariables
1262
1263
, " indexedVariables" .= indexedVariables
1263
1264
, " expensive" .= expensive
@@ -1313,7 +1314,7 @@ data Variable
1313
1314
-- This attribute should only be returned by a debug adapter if the
1314
1315
-- corresponding capability `supportsVariableType` is true.
1315
1316
--
1316
- , variablePresentationHint :: VariablePresentationHint
1317
+ , variablePresentationHint :: Maybe VariablePresentationHint
1317
1318
-- ^
1318
1319
-- Properties of a variable that can be used to determine how to render the
1319
1320
-- variable in the UI.
@@ -1323,7 +1324,7 @@ data Variable
1323
1324
-- The evaluatable name of this variable which can be passed to the `evaluate`
1324
1325
-- request to fetch the variable's value.
1325
1326
--
1326
- , variableReference :: Int
1327
+ , variableVariablesReference :: Int
1327
1328
-- ^
1328
1329
-- If `variablesReference` is > 0, the variable is structured and its children
1329
1330
-- can be retrieved by passing `variablesReference` to the `variables` request
@@ -1349,20 +1350,20 @@ data Variable
1349
1350
-- This attribute is only required if the corresponding capability
1350
1351
-- `supportsMemoryReferences` is true.
1351
1352
--
1352
- } deriving stock (Show , Eq )
1353
+ } deriving stock (Show , Eq , Generic )
1353
1354
----------------------------------------------------------------------------
1354
1355
instance ToJSON Variable where
1355
- toJSON Variable { .. }
1356
- = object
1357
- [ " value" .= variableValue
1358
- , " type" .= variableType
1359
- , " presentationHint" .= variablePresentationHint
1360
- , " evaluateName" .= variableEvaluateName
1361
- , " reference" .= variableReference
1362
- , " namedVariables" .= variableNamedVariables
1363
- , " IndexedVariables" .= variableIndexedVariables
1364
- , " memoryReference" .= variableMemoryReference
1365
- ]
1356
+ toJSON = genericToJSONWithModifier
1357
+ -- = object
1358
+ -- [ "value" .= variableValue
1359
+ -- , "type" .= variableType
1360
+ -- , "presentationHint" .= variablePresentationHint
1361
+ -- , "evaluateName" .= variableEvaluateName
1362
+ -- , "reference" .= variablesReference
1363
+ -- , "namedVariables" .= variableNamedVariables
1364
+ -- , "IndexedVariables" .= variableIndexedVariables
1365
+ -- , "memoryReference" .= variableMemoryReference
1366
+ -- ]
1366
1367
----------------------------------------------------------------------------
1367
1368
data VariablePresentationHint
1368
1369
= VariablePresentationHint
@@ -3159,7 +3160,7 @@ data NextArguments
3159
3160
-- Specifies the thread for which to resume execution for one step (of the
3160
3161
-- given granularity).
3161
3162
--
3162
- , nextArgumentsSingleThread :: Bool
3163
+ , nextArgumentsSingleThread :: Maybe Bool
3163
3164
-- ^
3164
3165
-- If this flag is true, all other suspended threads are not resumed.
3165
3166
--
@@ -3385,13 +3386,13 @@ instance FromJSON VariablesFilter where
3385
3386
----------------------------------------------------------------------------
3386
3387
data VariablesArguments
3387
3388
= VariablesArguments
3388
- { variablesArgumentsReference :: Int
3389
+ { variablesArgumentsVariablesReference :: Int
3389
3390
-- ^
3390
3391
-- The variable for which to retrieve its children. The `variablesReference`
3391
3392
-- must have been obtained in the current suspended state. See 'Lifetime of
3392
3393
-- Object References' in the Overview section for details.
3393
3394
--
3394
- , variablesArgumentsFilter :: Maybe VariablesArguments
3395
+ , variablesArgumentsFilter :: Maybe VariablesFilter
3395
3396
-- ^
3396
3397
-- Filter to limit the child variables to either named or indexed. If omitted,
3397
3398
-- both types are fetched.
0 commit comments