Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下egg 怎么在 webstorm下调试【环境window】 #1332

Closed
chen900112 opened this issue Aug 19, 2017 · 15 comments
Closed

请教下egg 怎么在 webstorm下调试【环境window】 #1332

chen900112 opened this issue Aug 19, 2017 · 15 comments
Assignees

Comments

@chen900112
Copy link

看了官网的调试,按照方式去做了但是没有调试起来,webstorm 【window环境】下是不能断点调试么?
window下想断点调试 应该采用哪种方式 比价好 谢谢

@atian25
Copy link
Member

atian25 commented Aug 19, 2017 via email

@chen900112
Copy link
Author

没有报错 在controller里面打的断点也没停
90ehgbt n5ki bo049xhfph
h xvj ib1t n jxu2_fdb

@atian25
Copy link
Member

atian25 commented Aug 19, 2017

可以再看下文档,需要传递一个环境变量的

@chen900112
Copy link
Author

您指的是这样,这个环境变量的写法 好像mac才有用
8_oj0ou 2iyo4 4 fq

@atian25
Copy link
Member

atian25 commented Aug 19, 2017 via email

@chen900112
Copy link
Author

是这样?
7wys6i fmavx8 0u99g i

@atian25
Copy link
Member

atian25 commented Aug 21, 2017

@okoala

@okoala
Copy link
Member

okoala commented Aug 29, 2017

@VanquisherMe

Win下建议你使用 Node.js v8 以上版本,安装 egg-development-proxyworker 插件,使用 egg-bin debug 启动命令,在chrome 中打开这条链接进行调试 chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:10087

@atian25
Copy link
Member

atian25 commented Aug 29, 2017

@okoala win 下没法传递那个 options ?

@chen900112
Copy link
Author

@okoala 可以了,如果WebStorm 想在IDE内调试 只能是mac? 文档提供的 "egg-bin dev $NODE_DEBUG_OPTION" 好像是 mac 下设置临时变量的方式。

@atian25
Copy link
Member

atian25 commented Aug 29, 2017

这跟 node 没啥关系,属于操作系统知识,$NODE_DEBUG_OPTION 是 linux 的环境变量获取方式,win 下是 %PATH% 这样的。

@chen900112
Copy link
Author

egg-bin dev %NODE_DEBUG_OPTION%之前尝试过这样 没有跑起来,所以也比较好奇 win 的应该怎么写

@sunfuze
Copy link

sunfuze commented Aug 30, 2017

windows 下用 set

@atian25
Copy link
Member

atian25 commented Aug 30, 2017

这里不是要设置环境变量,而是要读取环境变量,然后传递给 bin 参数

@atian25
Copy link
Member

atian25 commented Aug 30, 2017

@VanquisherMe 你升级下 egg-bin 最新版本,然后不用传递任何参数了,直接 egg-bin debug 试试。

文档那边也更新了,https://eggjs.org/zh-cn/core/development.html#使用-webstorm-进行调试

eggjs/bin#71 里面支持直接读取 WebStorm 的环境变量了.

@atian25 atian25 closed this as completed Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants