Class ExecuteSessionParams
Request for rdcore/session/execute: a client asks the language server to run one procedure
of a module it supplies.
[Method("rdcore/session/execute", Direction.ClientToServer)]
public record ExecuteSessionParams : IRequest, IRequest<Unit>, IRequest<ExecuteSessionResult>, IBaseRequest, IEquatable<ExecuteSessionParams>
- Inheritance
-
ExecuteSessionParams
- Implements
-
IRequestIRequest<Unit>IRequest<ExecuteSessionResult>IBaseRequest
- Inherited Members
Remarks
The source travels with the request rather than being read from the workspace, because the code a client wants to run is not always a file: an interactive shell's program lives in a buffer, and its immediate-mode line is a procedure that exists for exactly one statement's worth of time. The language server parses it, defines its symbols, and hands the result to whichever component owns the runtime session.
Cancelling the request is how a caller interrupts a running program — the shell's Ctrl+Break. The cancellation reaches the interpreter loop itself, so a program that will never finish on its own still stops.
Properties
Debug
Whether the program runs under a debugger: a Stop, a failed Debug.Assert or a break does not end the request but suspends the program, and the
answer is Suspended. It is resumed, stepped or ended by the requests of SessionDebugResumeParams. Without it a
Stop ends the run as Interrupted, as it always did.
public bool Debug { get; init; }
Property Value
EntryPoint
The name of the parameterless procedure to invoke.
public string EntryPoint { get; init; }
Property Value
Immediate
Whether the entry point is a statement typed at a prompt, to be run in the session as it is. While a program waits at a stop it is run alongside the program, which waits still - this is how its variables are read and set - and without it a run while a program waits starts the program over.
public bool Immediate { get; init; }
Property Value
ModuleName
The module's programmatic name, which is the scope the entry point is resolved in.
public string ModuleName { get; init; }
Property Value
Source
The complete source of the module to run — every procedure of it, not just the one being invoked, since the entry point may call the others.
public string Source { get; init; }