Hello World example
A .js
file to be executed from windbg.exe
:
function initializeScript() {
host.diagnostics.debugLog("Hello world\n");
}
In order to run this simple example, we make sure that the JsProvider extension is loaded, we run
.scriptproviders
:
0:000> .scriptproviders
Available Script Providers:
NatVis (extension '.NatVis')
JavaScript (extension '.js')
If the JavaScriprt
provider is not listed, we load it:
.load jsprovider.dll
Finally, we run the script with
.scriptload p:\ath\to\hello-world.js