In the end, EJS just translates into JavaScript and therefore just puts the debugger statement where you need it, and opening developer tools can do the trick for you. For example, to check the variable i in a for loop, you put your debugger as follows:
<script type="text/ejs" id="todoList"> <% for(var i = 0; i < todos.length; ++i) { %> <% debugger; %> <li><%= this[i].attr('description') </li> <% } %> </script>
source share