javascript - How to Debug EJS code in Chrome/Safari -


i using ejs templates canjs , looking way debug ejs code. firebug can show me syntax errors in ejs in other browsers, not able see anything.i need go through ejs file solve errors. searched on web , found out ejs_fulljslint https://code.google.com/p/embeddedjavascript/ , not able run properly. included script html file still wasn't getting console errors. not able find demo of debugging on web.

can tell me how debug ejs code. if can provide me example, highly appreciated.

in end, ejs translates javascript , therefore placing debugger; statement need , opening developer tools, might trick you. example, check on i variable in loop place debugger; this:

<script type="text/ejs" id="todolist">   <% for(var = 0; < todos.length; ++i) { %>     <% debugger; %>     <li><%= this[i].attr('description') </li>   <% } %> </script> 

Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -