Debugging Display Templates in SharePoint 2013 Search
January 25, 2013 6 Comments
One may find difficult to extend existing Display Templates in SharePoint 2013 because of missing IntelliSense and type ahead suggestions of available members in ctx.* and ctx.CurrentItem.*
As a workaround you can use following trick using Google Chrome .
Firstly, modify one of display templates and put debugger; line.
Then upload it back and open target page, open Developer Tools (CTRL+SHIFT+I) and refresh. Your screen should look similar to the picture below, debugger will stop at your breakpoint.
Finally, switch to Console tab and take advantage of “IntelliSense” which will auto suggest you names of all available variables.
Execution of ctx.CurrentItem command will print you values of variables as well.
Pingback: Debugging the Display Template « Karine Bosch’s Blog
Thanks, it feels like crawling but better then nothing. Hope Microsoft gives us a proper editor with intellisense soon.
Sweet website, super layout, very clean and utilise genial. dffeadcgdddb
Pingback: SharePoint 2013 – Debugging Display Templates | PursuitPoint
This is the proper blog for anyone who desires to find out about this topic. You understand a lot its almost arduous to argue with you (not that I truly would need…HaHa). You definitely put a brand new spin on a topic thats been written about for years. Great stuff, simply nice!
Thank you, thank you, thank you! This saved my life! I was able to find the correct field I needed!