Gruntjs 如何在JetBrains WebStorm中调试Grunt服务的站点

Gruntjs 如何在JetBrains WebStorm中调试Grunt服务的站点,gruntjs,yeoman,webstorm,grunt-contrib-connect,Gruntjs,Yeoman,Webstorm,Grunt Contrib Connect,我使用了Yeoman生成器,并使用Grunt通过连接模块提供文件: // The actual grunt server settings connect: { options: { port: 9000, // Change this to '0.0.0.0' to access the server from outside. hostname: 'localhost', livereload: 35730

我使用了Yeoman生成器,并使用Grunt通过连接模块提供文件:

// The actual grunt server settings
    connect: {
      options: {
        port: 9000,
        // Change this to '0.0.0.0' to access the server from outside.
        hostname: 'localhost',
        livereload: 35730
      },
      livereload: {
        options: {
          open: true,
          base: [
            '.tmp',
            '<%= yeoman.app %>'
          ]
        }
      },
//实际的grunt服务器设置
连接:{
选项:{
港口:9000,
//将此更改为“0.0.0.0”以从外部访问服务器。
主机名:“localhost”,
利弗雷罗德:35730
},
利弗雷罗德:{
选项:{
开放:是的,
基数:[
“.tmp”,
''
]
}
},
在浏览器中进行测试,并使用Chromes开发工具进行调试,一切正常

然而,我更愿意通过WebStorm的浏览器插件在WebStorm内部进行调试。是否可以将连接进程连接到WebStorm,以这种方式进行调试?

请参见 简而言之,要实现这一点,您通常需要为用于启动Grunt的Node.js运行配置启用“browser/Live edit”(“启动后”和“使用javascript调试器”选中,
)http://localhost:9000“
指定的URL)并将GrunFile中的“open”livereload选项从“true”更改为“false”,以避免在127.0.0.1:9000上打开第二个选项卡