从PhantomJS/CasperJS中的"SyntaxError:Parse error"消息中获取更多信息

Anu*_*pta 3 javascript debugging syntax-error phantomjs casperjs

我有一个很长的CasperJS脚本.当我运行它时,我得到:

phantomjs file.js    
SyntaxError: Parse error

有没有办法获得有关错误的更多信息.至少一个行号?或任何暗示?

Ton*_*ony 5

尝试使用node运行file.js,因此对于您的示例:

node file.js
Run Code Online (Sandbox Code Playgroud)