terminal/tools/WindbgExtension.js
Dustin Howett d4d59fa339 Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source,
under the MIT license.
2019-05-02 15:29:04 -07:00

26 lines
894 B
JavaScript

// Usage from within windbg:
// 1. load symbols for the module containing conhost
// 2. .load jsprovider.dll
// 3. .scriptload <some-path-to-this-file>\WindbgExtension.js
//
// From here, commands can be called. For example, to get information about ServiceLocator::s_globals:
// dx @$scriptContents.ServiceLocatorVar("s_globals")
function initializeScript()
{
host.diagnostics.debugLog("***> OpenConsole debugger extension loaded \n");
}
// Routine Description:
// - Displays information about a field found in the ServiceLocator class
// Arguments:
// - varName - the variable to display information for
// Return Value:
// - debugger object used to display information about varName
function ServiceLocatorVar(varName)
{
return host.namespace.Debugger.Utility.Control.ExecuteCommand("dx Microsoft::Console::Interactivity::ServiceLocator::" + varName);
}