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

使用用户 launch.json 自定义 env #77

Closed
q962 opened this issue Nov 4, 2021 · 4 comments
Closed

使用用户 launch.json 自定义 env #77

q962 opened this issue Nov 4, 2021 · 4 comments

Comments

@q962
Copy link
Contributor

q962 commented Nov 4, 2021

看了代码,调试并没有做环境变量处理。

所以 xmake.lua set_runenv 无法生效

xmake 可以有办法输出 set_runenv 的值吗?如果有那就不需要用户写两次 env

q962@92673c5

@waruqi
Copy link
Member

waruqi commented Nov 4, 2021

目前不支持,需要改插件透传envs到

environment: [],

@q962
Copy link
Contributor Author

q962 commented Nov 4, 2021

是的,我这么做了 q962@92673c5

@waruqi
Copy link
Member

waruqi commented Nov 4, 2021

其实也不用这么搞,现在原本就支持的,走 xmake.customDebugConfig 配置覆盖 environment 就行了,不需要改插件

var customcfg = config.customDebugConfig;
for (let key in customcfg) {
debugConfig[key] = customcfg[key];
}

@q962
Copy link
Contributor Author

q962 commented Nov 4, 2021

嗯,确实一样的效果。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants