5
Node.js/Express의 EJS로 PHP 템플릿을 변환하고 있습니다. 템플릿 파일은 다소 복잡하므로 디버깅이 쉽지 않습니다. 노드가 디버깅에 유용한 정보를 제공하지 않기 때문에이 작업을 거의 불가능하게 만듭니다. 다음은 샘플 오류 메시지입니다.Node/Express에서 EJS 템플릿을 디버깅하는 방법
SyntaxError: Unexpected string in "app/views/profile/index.ejs"
at Object.Function (<anonymous>)
at exports.compile (/Users/Gavin/Web/node_modules/ejs/lib/ejs.js:237:14)
at Object.exports.render (/Users/Gavin/Web/node_modules/ejs/lib/ejs.js:284:10)
at View.exports.renderFile [as engine] (/Users/Gavin/Web/node_modules/ejs/lib/ejs.js:318:20)
at View.render (/Users/Gavin/Web/node_modules/express/lib/view.js:76:8)
at Function.app.render (/Users/Gavin/Web/node_modules/express/lib/application.js:502:10)
at ServerResponse.res.render (/Users/Gavin/Web/node_modules/express/lib/response.js:777:7)
at Object.exports.profile_index [as handle] (/Users/Gavin/Web/app/controllers/routes/profile.js:72:6)
at next_layer (/Users/Gavin/Web/node_modules/express/lib/router/route.js:103:13)
at Object.exports.verify_user [as handle] (/Users/Gavin/Web/app/controllers/routes/account.js:305:10)
그런 막연한 오류 메시지의 출처를 찾는 일은 지루합니다. EJS 파일을 디버그하는 쉬운 방법이 있습니까?