Apparently this is a very old trick (pre 2006). Just add the debugger command (and enable script debugging if your using IE).
Let’s look at what it takes to make a minor tweak to the out of the box search result in SharePoint 2013. Say my requirement is to show the document id in the search result like the sample shown below.
For the example above I’m going to create a custom display template for PowerPoint files.
Let’s start by mapping the display templates folder as a local drive. Browse to /_layouts/15/DesignMapDrive.aspx and click on the /_catalogs/masterpage/ link to open the drive. You can then map that as a network drive.
Through explorer browser to the \_catalogs\masterpage\Display Templates\Search folder and copy these two files file to a local drive.
Rename Item_PowerPoint.html to make it your own.
Open up the file and change the <title> node. This is what get’s displayed in SharePoint.
Make the changes highlighted below.
Upload your custom html file to Search display templates mapped folder.
Now browse to the Manage Result Types page from Site Collection Administration and make a copy of the Microsoft PowerPoint result type.
From the Actions drop down pick the display template that you just uploaded and your all set.