简体   繁体   English

如何在IntelliJ IDEA中执行Grunt远程调试?

[英]How to perform grunt remote debug in IntelliJ IDEA?

I build and run my typescript application by Grunt and connect(grunt-contrib-connect) and livereload plugins. 我通过Grunt和connect(grunt-contrib-connect)和livereload插件构建并运行我的打字稿应用程序。 While grunt compile .ts files, it also generate sourcemap. 当grunt编译.ts文件时,它还会生成sourcemap。 My application is oppening on google chrome. 我的应用程序正在使用谷歌浏览器。 How can I remotely connect by Intellij Idea to this application that was run by Grunt and oppened in Chrome for perform debug? 如何通过Intellij Idea远程连接到此应用程序,该应用程序由Grunt运行并安装在Chrome中用于执行调试?

This post is my last hope, that it is possible. 这是我最后的希望,那就是可能。 Thanks 谢谢

that should be enough... Start grunt, and, when the server is up and running, debug the configuration above 这应该足够了...开始咕unt,然后在服务器启动并运行时,调试上面的配置

Thank you. 谢谢。 I found solution. 我找到了解决方案。

  1. First of all, I need Jet Brains extension for Chrome. 首先,我需要适用于Chrome的Jet Brains扩展程序。
  2. I need to make configure debug mode "JavaScript debug" and specify URL that grunt will run and open application. 我需要将配置调试模式设置为“ JavaScript debug”,并指定grunt将运行的URL并打开应用程序。
  3. Run Grunt task that build and open application in browser. 运行Grunt任务,以在浏览器中构建并打开应用程序。
  4. Run debug mode that just reload same page under debugger already. 运行已在调试器下重新加载同一页面的调试模式。
  5. Don't forget enjoy it. 别忘了享受它。

Since I use typescript, ability to debug in IDE was very important. 由于我使用打字稿,因此在IDE中进行调试的能力非常重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM