setAutoAttach

Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by autoAttachRelated from the list of targets to watch for creation of related targets.

Official doc

Note: this function uses an input class, and constructing this class manually may lead to incompatibilities if the class's constructor arguments change in the future. For maximum compatibility, it is advised to use the overload of this function that directly takes the mandatory parameters as arguments, and the optional ones from a configuration lambda.


inline suspend fun setAutoAttach(autoAttach: Boolean, waitForDebuggerOnStart: Boolean, optionalArgs: SetAutoAttachRequest.Builder.() -> Unit = {}): SetAutoAttachResponse(source)

Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by autoAttachRelated from the list of targets to watch for creation of related targets.

Official doc

Parameters

autoAttach

Whether to auto-attach to related targets.

waitForDebuggerOnStart

Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.