VmService class
- Available extensions
Constructors
- VmService.new(Stream inStream, void writeMessage(String message), {Log? log, DisposeHandler? disposeHandler, Future? streamClosed, String? wsUri})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onDebugEvent
→ Stream<
Event> -
no setter
-
onDone
→ Future<
void> -
no setter
-
onExtensionEvent
→ Stream<
Event> -
no setter
-
onGCEvent
→ Stream<
Event> -
no setter
-
onHeapSnapshotEvent
→ Stream<
Event> -
no setter
-
onIsolateEvent
→ Stream<
Event> -
no setter
-
onLoggingEvent
→ Stream<
Event> -
no setter
-
onProfilerEvent
→ Stream<
Event> -
no setter
-
onReceive
→ Stream<
String> -
no setter
-
onSend
→ Stream<
String> -
no setter
-
onServiceEvent
→ Stream<
Event> -
no setter
-
onStderrEvent
→ Stream<
Event> -
no setter
-
onStdoutEvent
→ Stream<
Event> -
no setter
-
onTimelineEvent
→ Stream<
Event> -
no setter
-
onTimerEvent
→ Stream<
Event> -
no setter
-
onVMEvent
→ Stream<
Event> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wsUri → String?
-
The web socket URI pointing to the target VM service instance.
final
Methods
-
addBreakpoint(
String isolateId, String scriptId, int line, {int? column}) → Future< Breakpoint> -
The
addBreakpointRPC is used to add a breakpoint at a specific line of some script. -
addBreakpointAtEntry(
String isolateId, String functionId) → Future< Breakpoint> -
The
addBreakpointAtEntryRPC is used to add a breakpoint at the entrypoint of some function. -
addBreakpointWithScriptUri(
String isolateId, String scriptUri, int line, {int? column}) → Future< Breakpoint> -
The
addBreakpointRPC is used to add a breakpoint at a specific line of some script. This RPC is useful when a script has not yet been assigned an id, for example, if a script is in a deferred library which has not yet been loaded. -
callMethod(
String method, {String? isolateId, Map< String, dynamic> ? args}) → Future<Response> - Call an arbitrary service protocol method. This allows clients to call methods not explicitly exposed by this library.
-
callServiceExtension(
String method, {String? isolateId, Map< String, dynamic> ? args}) → Future<Response> - Invoke a specific service protocol extension method.
-
clearCpuSamples(
String isolateId) → Future< Success> - Clears all CPU profiling samples.
-
clearHttpProfile(
String isolateId) → Future< Success> -
Available on VmService, provided by the DartIOExtension extension
TheclearHttpProfileRPC is used to clear previously recorded HTTP requests from the HTTP profiler state. Requests still in-flight after clearing the profiler state will be ignored by the profiler. -
clearSocketProfile(
String isolateId) → Future< Success> -
Available on VmService, provided by the DartIOExtension extension
Removes all statistics associated with prior and current sockets. -
clearVMTimeline(
) → Future< Success> - Clears all VM timeline events.
-
createIdZone(
String isolateId, String backingBufferKind, String idAssignmentPolicy, {int? capacity}) → Future< IdZone> -
The
createIdZoneRPC is used to create a new ID zone where temporary IDs for instances in the specified isolate may be allocated. SeeIDs and Namesfor more information about ID zones. -
deleteIdZone(
String isolateId, String idZoneId) → Future< Success> -
The
deleteIdZoneRPC frees the buffer that backs the specified ID zone, and makes that zone unusable for the remainder of the program's execution. For performance reasons, clients should aim to call invalidateIdZone and reuse existing zones as much as possible instead of deleting zones and then creating new ones. -
dispose(
) → Future< void> -
evaluate(
String isolateId, String targetId, String expression, {Map< String, String> ? scope, bool? disableBreakpoints, String? idZoneId}) → Future<Response> -
The
evaluateRPC is used to evaluate an expression in the context of some target. -
evaluateInFrame(
String isolateId, int frameIndex, String expression, {Map< String, String> ? scope, bool? disableBreakpoints, String? idZoneId}) → Future<Response> -
The
evaluateInFrameRPC is used to evaluate an expression in the context of a particular stack frame.frameIndexis the index of the desired Frame, with an index of0indicating the top (most recent) frame. -
getAllocationProfile(
String isolateId, {bool? reset, bool? gc}) → Future< AllocationProfile> -
The
getAllocationProfileRPC is used to retrieve allocation information for a given isolate. -
getAllocationTraces(
String isolateId, {int? timeOriginMicros, int? timeExtentMicros, String? classId}) → Future< CpuSamples> -
The
getAllocationTracesRPC allows for the retrieval of allocation traces for objects of a specific set of types (see VmService.setTraceClassAllocation). Only samples collected in the time range[timeOriginMicros, timeOriginMicros + timeExtentMicros]will be reported. -
getClassList(
String isolateId) → Future< ClassList> -
The
getClassListRPC is used to retrieve aClassListcontaining all classes for an isolate based on the isolate'sisolateId. -
getCpuSamples(
String isolateId, int timeOriginMicros, int timeExtentMicros) → Future< CpuSamples> -
The
getCpuSamplesRPC is used to retrieve samples collected by the CPU profiler. See CpuSamples for a detailed description of the response. -
getDartIOVersion(
String isolateId) → Future< Version> -
Available on VmService, provided by the DartIOExtension extension
ThegetDartIOVersionRPC returns the available version of the dart:io service protocol extensions. -
getFlagList(
) → Future< FlagList> -
The
getFlagListRPC returns a list of all command line flags in the VM along with their current values. -
getHttpProfile(
String isolateId, {DateTime? updatedSince}) → Future< HttpProfile> -
Available on VmService, provided by the DartIOExtension extension
ThegetHttpProfileRPC is used to retrieve HTTP profiling information for requests made viadart:io'sHttpClient. -
getHttpProfileRequest(
String isolateId, String id) → Future< HttpProfileRequest> -
Available on VmService, provided by the DartIOExtension extension
ThegetHttpProfileRequestRPC is used to retrieve an instance of HttpProfileRequest, which includes request and response body data. -
getInboundReferences(
String isolateId, String targetId, int limit, {String? idZoneId}) → Future< InboundReferences> -
Returns a set of inbound references to the object specified by
targetId. Up tolimitreferences will be returned. -
getInstances(
String isolateId, String objectId, int limit, {bool? includeSubclasses, bool? includeImplementers, String? idZoneId}) → Future< InstanceSet> -
The
getInstancesRPC is used to retrieve a set of instances which are of a specific class. -
getInstancesAsList(
String isolateId, String objectId, {bool? includeSubclasses, bool? includeImplementers, String? idZoneId}) → Future< InstanceRef> -
The
getInstancesAsListRPC is used to retrieve a set of instances which are of a specific class. This RPC returns anInstanceRefcorresponding to a DartList<dynamic>that contains the requested instances. ThisListis not growable, but it is otherwise mutable. The response type is what distinguishes this RPC fromgetInstances, which returns anInstanceSet. -
getIsolate(
String isolateId) → Future< Isolate> -
The
getIsolateRPC is used to lookup anIsolateobject by itsid. -
getIsolateGroup(
String isolateGroupId) → Future< IsolateGroup> -
The
getIsolateGroupRPC is used to lookup anIsolateGroupobject by itsid. -
getIsolateGroupMemoryUsage(
String isolateGroupId) → Future< MemoryUsage> -
The
getIsolateGroupMemoryUsageRPC is used to lookup an isolate group's memory usage statistics by itsid. -
getIsolatePauseEvent(
String isolateId) → Future< Event> -
The
getIsolatePauseEventRPC is used to lookup an isolate's pause event by itsid. -
getMemoryUsage(
String isolateId) → Future< MemoryUsage> -
The
getMemoryUsageRPC is used to lookup an isolate's memory usage statistics by itsid. -
getObject(
String isolateId, String objectId, {int? offset, int? count, String? idZoneId}) → Future< Obj> -
The
getObjectRPC is used to lookup anobjectfrom some isolate by itsid. -
getOpenFileById(
String isolateId, int id) → Future< OpenFile> -
Available on VmService, provided by the DartIOExtension extension
ThegetOpenFileByIdRPC is used to retrieve information about files currently opened bydart:iofrom a given isolate. -
getOpenFiles(
String isolateId) → Future< OpenFileList> -
Available on VmService, provided by the DartIOExtension extension
ThegetOpenFilesRPC is used to retrieve the list of files currently opened files bydart:iofrom a given isolate. -
getPerfettoCpuSamples(
String isolateId, {int? timeOriginMicros, int? timeExtentMicros}) → Future< PerfettoCpuSamples> -
The
getPerfettoCpuSamplesRPC is used to retrieve samples collected by the CPU profiler, serialized in Perfetto's proto format. See PerfettoCpuSamples for a detailed description of the response. -
getPerfettoVMTimeline(
{int? timeOriginMicros, int? timeExtentMicros}) → Future< PerfettoTimeline> -
The
getPerfettoVMTimelineRPC is used to retrieve an object which contains a VM timeline trace represented in Perfetto's proto format. See PerfettoTimeline for a detailed description of the response. -
getPorts(
String isolateId) → Future< PortList> -
The
getPortsRPC is used to retrieve the list ofReceivePortinstances for a given isolate. -
getProcessMemoryUsage(
) → Future< ProcessMemoryUsage> - Returns a description of major uses of memory known to the VM.
-
getQueuedMicrotasks(
String isolateId) → Future< QueuedMicrotasks> -
The
getQueuedMicrotasksRPC returns a snapshot containing information about the microtasks that were queued in the specified isolate when the snapshot was taken. -
getRetainingPath(
String isolateId, String targetId, int limit, {String? idZoneId}) → Future< RetainingPath> -
The
getRetainingPathRPC is used to lookup a path from an object specified bytargetIdto a GC root (i.e., the object which is preventing this object from being garbage collected). -
getScripts(
String isolateId) → Future< ScriptList> -
The
getScriptsRPC is used to retrieve aScriptListcontaining all scripts for an isolate based on the isolate'sisolateId. -
getSocketProfile(
String isolateId) → Future< SocketProfile> -
Available on VmService, provided by the DartIOExtension extension
ThegetSocketProfileRPC is used to retrieve socket statistics collected by the socket profiler. Only samples collected after the initial socketProfilingEnabled call or the last call to clearSocketProfile will be reported. -
getSourceReport(
String isolateId, List< String> reports, {String? scriptId, int? tokenPos, int? endTokenPos, bool? forceCompile, bool? reportLines, List<String> ? libraryFilters, List<String> ? librariesAlreadyCompiled}) → Future<SourceReport> -
The
getSourceReportRPC is used to generate a set of reports tied to source locations in an isolate. -
getSpawnedProcessById(
String isolateId, int id) → Future< SpawnedProcess> -
Available on VmService, provided by the DartIOExtension extension
ThegetSpawnedProcessByIdRPC is used to retrieve information about a process spawned bydart:iofrom a given isolate. -
getSpawnedProcesses(
String isolateId) → Future< SpawnedProcessList> -
Available on VmService, provided by the DartIOExtension extension
ThegetSpawnedProcessesRPC is used to retrieve the list of processed opened bydart:iofrom a given isolate -
getStack(
String isolateId, {int? limit, String? idZoneId}) → Future< Stack> -
The
getStackRPC is used to retrieve the current execution stack and message queue for an isolate. The isolate does not need to be paused. -
getSupportedProtocols(
) → Future< ProtocolList> -
The
getSupportedProtocolsRPC is used to determine which protocols are supported by the current server. -
getVersion(
) → Future< Version> -
The
getVersionRPC is used to determine what version of the Service Protocol is served by a VM. -
getVM(
) → Future< VM> -
The
getVMRPC returns global information about a Dart virtual machine. -
getVMTimeline(
{int? timeOriginMicros, int? timeExtentMicros}) → Future< Timeline> -
The
getVMTimelineRPC is used to retrieve an object which contains VM timeline events. See Timeline for a detailed description of the response. -
getVMTimelineFlags(
) → Future< TimelineFlags> -
The
getVMTimelineFlagsRPC returns information about the current VM timeline configuration. -
getVMTimelineMicros(
) → Future< Timestamp> -
The
getVMTimelineMicrosRPC returns the current time stamp from the clock used by the timeline, similar toTimeline.nowindart:developerandDart_TimelineGetMicrosin the VM embedding API. -
httpEnableTimelineLogging(
String isolateId, [bool? enabled]) → Future< HttpTimelineLoggingState> -
Available on VmService, provided by the DartIOExtension extension
ThehttpEnableTimelineLoggingRPC is used to set and inspect the value ofHttpClient.enableTimelineLogging, which determines if HTTP client requests should be logged to the timeline. Ifenabledis provided, the state ofHttpClient.enableTimelineLoggingwill be updated to the value ofenabled. -
invalidateIdZone(
String isolateId, String idZoneId) → Future< Success> -
The
invalidateIdZoneRPC is used to invalidate all the IDs that have been allocated in a certain ID zone. Invaliding the IDs makes them expire. SeeIDs and Namesfor more information. -
invoke(
String isolateId, String targetId, String selector, List< String> argumentIds, {bool? disableBreakpoints, String? idZoneId}) → Future<Response> -
The
invokeRPC is used to perform regular method invocation on some receiver, as if by dart:mirror's ObjectMirror.invoke. Note this does not provide a way to perform getter, setter or constructor invocation. -
isHttpProfilingAvailable(
String isolateId) → Future< bool> -
Available on VmService, provided by the DartIOExtension extension
Whether HTTP profiling is available for the givenisolateId. -
isHttpTimelineLoggingAvailable(
String isolateId) → Future< bool> -
Available on VmService, provided by the DartIOExtension extension
Whether HTTP timeline logging is available for the givenisolateId. -
isSocketProfilingAvailable(
String isolateId) → Future< bool> -
Available on VmService, provided by the DartIOExtension extension
Whether socket profiling is available for the givenisolateId. -
kill(
String isolateId) → Future< Success> -
The
killRPC is used to kill an isolate as if by dart:isolate'sIsolate.kill(IMMEDIATE). -
lookupPackageUris(
String isolateId, List< String> uris) → Future<UriList> -
The
lookupPackageUrisRPC is used to convert a list of URIs to their unresolved paths. For example, URIs passed to this RPC are mapped in the following ways: -
lookupResolvedPackageUris(
String isolateId, List< String> uris, {bool? local}) → Future<UriList> -
The
lookupResolvedPackageUrisRPC is used to convert a list of URIs to their resolved (or absolute) paths. For example, URIs passed to this RPC are mapped in the following ways: -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEvent(
String streamId) → Stream< Event> -
pause(
String isolateId) → Future< Success> -
The
pauseRPC is used to interrupt a running isolate. The RPC enqueues the interrupt request and potentially returns before the isolate is paused. -
registerService(
String service, String alias) → Future< Success> -
Registers a service that can be invoked by other VM service clients, where
serviceis the name of the service to advertise andaliasis an alternative name for the registered service. -
registerServiceCallback(
String service, ServiceCallback cb) → void - Register a service for invocation.
-
reloadSources(
String isolateId, {bool? force, bool? pause, String? rootLibUri, String? packagesUri}) → Future< ReloadReport> -
The
reloadSourcesRPC is used to perform a hot reload of the sources of all isolates in the same isolate group as the isolate specified byisolateId. -
removeBreakpoint(
String isolateId, String breakpointId) → Future< Success> -
The
removeBreakpointRPC is used to remove a breakpoint by itsid. -
requestHeapSnapshot(
String isolateId) → Future< Success> - Requests a dump of the Dart heap of the given isolate.
-
resume(
String isolateId, {String? step, int? frameIndex}) → Future< Success> -
The
resumeRPC is used to resume execution of a paused isolate. -
setBreakpointState(
String isolateId, String breakpointId, bool enable) → Future< Breakpoint> -
The
setBreakpointStateRPC allows for breakpoints to be enabled or disabled, without requiring for the breakpoint to be completely removed. -
setExceptionPauseMode(
String isolateId, String mode) → Future< Success> -
The
setExceptionPauseModeRPC is used to control if an isolate pauses when an exception is thrown. -
setFlag(
String name, String value) → Future< Response> -
The
setFlagRPC is used to set a VM flag at runtime. Returns an error if the named flag does not exist, the flag may not be set at runtime, or the value is of the wrong type for the flag. -
setIsolatePauseMode(
String isolateId, {String? exceptionPauseMode, bool? shouldPauseOnExit}) → Future< Success> -
The
setIsolatePauseModeRPC is used to control if or when an isolate will pause due to a change in execution state. -
setLibraryDebuggable(
String isolateId, String libraryId, bool isDebuggable) → Future< Success> -
The
setLibraryDebuggableRPC is used to enable or disable whether breakpoints and stepping work for a given library. -
setName(
String isolateId, String name) → Future< Success> -
The
setNameRPC is used to change the debugging name for an isolate. -
setTraceClassAllocation(
String isolateId, String classId, bool enable) → Future< Success> -
The
setTraceClassAllocationRPC allows for enabling or disabling allocation tracing for a specific type of object. Allocation traces can be retrieved with thegetAllocationTracesRPC. -
setVMName(
String name) → Future< Success> -
The
setVMNameRPC is used to change the debugging name for the vm. -
setVMTimelineFlags(
List< String> recordedStreams) → Future<Success> -
The
setVMTimelineFlagsRPC is used to set which timeline streams are enabled. -
socketProfilingEnabled(
String isolateId, [bool? enabled]) → Future< SocketProfilingState> -
Available on VmService, provided by the DartIOExtension extension
The socketProfilingEnabled RPC is used to enable/disable the socket profiler and query its current state. Ifenabledis provided, the profiler state will be updated to reflect the value ofenabled. -
streamCancel(
String streamId) → Future< Success> -
The
streamCancelRPC cancels a stream subscription in the VM. -
streamCpuSamplesWithUserTag(
List< String> userTags) → Future<Success> -
The
streamCpuSamplesWithUserTagRPC allows for clients to specify which CPU samples collected by the profiler should be sent over theProfilerstream. When called, the VM will streamCpuSamplesevents containingCpuSample's collected while a user tag contained inuserTagswas active. -
streamListen(
String streamId) → Future< Success> -
The
streamListenRPC subscribes to a stream in the VM. Once subscribed, the client will begin receiving events from the stream. -
toString(
) → String -
A string representation of this object.
inherited
-
wrapFuture<
T> (String name, Future< T> future) → Future<T> -
When overridden, this method wraps
futurewith logic.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
defaultFactory(
{required Stream inStream, required void writeMessage(String message), Log? log, DisposeHandler? disposeHandler, Future? streamClosed, String? wsUri}) → VmService