0

我使用了 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 %>'
          ]
        }
      },

每件事都可以在浏览器中正常测试并使用 Chrome 开发工具进行调试。

但是我更喜欢通过其浏览器插件在 WebStorm 内部进行调试是否可以将连接过程连接到 WebStorm 以这种方式进行调试?

4

1 回答 1

1

请参阅http://devnet.jetbrains.com/message/5505407#5505407 简而言之,要完成这项工作,您通常需要为用于启动 Grunt 的 Node.js 运行配置启用“浏览器/实时编辑”(“启动后' 和 'with javascript debugger' 检查,'http://localhost:9000'指定 URL)并在 gruntfile 中将 'open' livereload 选项从 'true' 更改为 'false' 以避免在 127.0.0.1:9000 上打开第二个选项卡

于 2014-04-13T09:39:13.183 回答