egg icon indicating copy to clipboard operation
egg copied to clipboard

egg的debug模式不支持指定host,只能指定port

Open brizer opened this issue 4 years ago • 1 comments

What happens?

egg-bin debug启动不能指定hostname,默认是node-inspecter的 127.0.0.1,这里能否透传参数支持0.0.0.0的自定义。这样可以和java统一下,我们云平台调试方便。

最小可复现仓库

请使用 npm init egg --type=simple bug 创建,并上传到你的 GitHub 仓库

复现步骤,错误日志以及相关配置

相关环境信息

  • 操作系统
  • Node 版本
  • Egg 版本

brizer avatar Jul 20 '21 02:07 brizer

麻烦评估下可行性,本人对egg生态源码不是特别了解,初步看egg-clustor里只使用了port。

if (this.options.isDebug) opt.execArgv = process.execArgv.concat([ `--${semver.gte(process.version, '8.0.0') ? 'inspect' : 'debug'}-port=${debugPort}` ]);

希望可以只是debug时hostname的自定义支持。

brizer avatar Jul 20 '21 02:07 brizer