How do I share Javascript code between files in Windbg preview?

by Derek   Last Updated January 14, 2018 12:26 PM

How do I share Javascript code between files in Windbg preview?

Right now I have several helper methods that I have copied and pasted into different javascript files. I'm not all that experienced with javascript, so my apologies if this is a stupid question.

As an example, let's say I want to use this function in more than one file:

function GetGuid( objectPtr )
{
    return ExecuteCommandToString( "dt nt!_GUID " + objectPtr )
    .FindLineContaining("{").trim().replace("{", "").replace("}","");
}


Related Questions


Access to filesystem from WinDBG's JavaScript script

Updated September 24, 2017 12:26 PM

Windbg symbol error

Updated March 09, 2017 21:26 PM


Windbg .logopen file location

Updated February 14, 2018 10:26 AM

Break when a register has an specific value?

Updated February 14, 2018 13:26 PM