Class RDCoreDebugAdapterLaunch
How to start the debug adapter of a deployed platform, and what to launch with it: the preparation an IDE does before it starts a debugging session of a workspace.
public sealed class RDCoreDebugAdapterLaunch
- Inheritance
-
RDCoreDebugAdapterLaunch
- Inherited Members
Remarks
The debug adapter is the language server's executable, started as one: --dap --workspace <uri> (Switch). It speaks the Debug
Adapter Protocol over its standard input and output, and brings up the rest of the platform itself, from the manifest, for the workspace it was given.
The platform root is given to it explicitly (PlatformRootEnvironmentVariable), as it is to the language server.
What to run is said in the DAP launch request, beyond what every launch request says: LaunchArguments, named
ModuleArgument and EntryPointArgument. Each is there only when the client said it, and the adapter decides what is not: a launch
that names no module runs the one standard module that declares the entry point, and is refused, with the reason, when none does or more than one does.
A DAP attach request runs no program, and takes no argument beyond what every attach request says. The adapter brings the platform up for the
workspace as a launch does, and the session stays until the client disconnects: a statement of the debug console runs in it as at a prompt, and a stop in
the handler of an event that runs while no program runs (a click on a form that such a statement showed) is a DAP stopped event, which the client
resumes, steps or ends as a program's stop (SessionStops).
Fields
AdapterId
The type of debug adapter this is, as a DAP client's initialize request says it (adapterID): rdcore.
public const string AdapterId = "rdcore"
Field Value
EntryPointArgument
The argument of the launch request that names the procedure the program starts with: entryPoint.
public const string EntryPointArgument = "entryPoint"
Field Value
ModuleArgument
The argument of the launch request that names the module with the entry point: module.
public const string ModuleArgument = "module"
Field Value
Switch
The switch that starts the language server's executable as a debug adapter: --dap.
public const string Switch = "--dap"
Field Value
Properties
Arguments
Its arguments, one each: --dap and --workspace.
public required IReadOnlyList<string> Arguments { get; init; }
Property Value
Environment
The environment variables to set for it, over the client's own.
public required IReadOnlyDictionary<string, string> Environment { get; init; }
Property Value
ExecutablePath
The executable of the debug adapter, as a full path: the language server's.
public required string ExecutablePath { get; init; }
Property Value
LaunchArguments
What the client's launch request says beyond what every one says, by name: ModuleArgument and EntryPointArgument, each
when the client gave one, and none when it gave neither.
public required IReadOnlyDictionary<string, string> LaunchArguments { get; init; }
Property Value
Manifest
The platform manifest the debug adapter was found from.
public required PlatformManifest Manifest { get; init; }
Property Value
PlatformRoot
The platform root, as a full path.
public required string PlatformRoot { get; init; }
Property Value
WorkingDirectory
The folder to start it in: its own.
public required string WorkingDirectory { get; init; }
Property Value
Methods
Prepare(RDCoreDebugAdapterLaunchOptions)
Prepares the start of the debug adapter of the platform at PlatformRoot, and its launch.
public static RDCoreDebugAdapterLaunch Prepare(RDCoreDebugAdapterLaunchOptions options)
Parameters
optionsRDCoreDebugAdapterLaunchOptionsThe platform, the workspace, and what to run.
Returns
- RDCoreDebugAdapterLaunch
How to start it, and what to launch.
Exceptions
- ArgumentException
The workspace is not an absolute
file:URI, nor an absolute path.- DirectoryNotFoundException
The platform root does not exist.
- FileNotFoundException
The platform root has no manifest, or the manifest names a language server that is not there.
- InvalidDataException
The manifest is not one, names no language server, or names an executable that is not under the platform root.
ToProcessStartInfo()
The start of the debug adapter as a ProcessStartInfo, for a client that starts it itself: its standard input and output are redirected, since the protocol is spoken over them.
public ProcessStartInfo ToProcessStartInfo()