host
The
host
object can be examined with the
dx
command
after loading a script, using the
@$scriptContents
variable:
0:007> dx -v @$scriptContents.host
@$scriptContents.host : [object Object]
currentApiVersionSupported : [object Object]
currentApiVersionInitialized : [object Object]
diagnostics : [object Object]
metadata : [object Object]
typeSignatureRegistration
typeSignatureExtension
namedModelRegistration
namedModelParent
functionAlias
namespacePropertyParent
optionalRecord
apiVersionSupport
resourceFileName
Int64
parseInt64
namespace
evaluateExpression
evaluateExpressionInContext
getModuleSymbol
getModuleContainingSymbol
getModuleSymbolAddress
setModuleSymbol
getModuleType
createInstance
createPointerObject
createTypedObject
indexedValue
getNamedModel
registerNamedModel
unregisterNamedModel
registerPrototypeForTypeSignature
registerExtensionForTypeSignature
unregisterPrototypeForTypeSignature
unregisterExtensionForTypeSignature
resourceLookup
currentSession : Live user mode: <Local>
currentProcess : notepad.exe
currentThread : ntdll!DbgUiRemoteBreakin (00007ff9`98d5c900)
memory : [object Object]
typeSystem : [object Object]
ToDisplayString [ToDisplayString([FormatSpecifier]) - Method which converts the object to its display string representation according to an optional format specifier]
host.namespace.Debugger
host.namespace.Debugger
can directly be accessed with dx Debugger
:
0:007> dx -v @$scriptContents.host.namespace.Debugger
@$scriptContents.host.namespace.Debugger
Sessions
Settings
State
Utility
0:007> dx Debugger
Debugger
Sessions
Settings
State
Utility
host.namespace.Debugger.Utility.Control.ExecuteCommand
Another interesting Object/method is
host.namespace.Debugger.Utility.Control.ExecuteCommand
which allows to execute
commands such as
g
(go):
if (…) {
host.namespace.Debugger.Utility.Control.ExecuteCommand("g");
}