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

关于getInfo(),能否增加一个目录映射的配置? #18

Closed
lhead opened this issue May 15, 2019 · 5 comments
Closed

关于getInfo(),能否增加一个目录映射的配置? #18

lhead opened this issue May 15, 2019 · 5 comments

Comments

@lhead
Copy link

lhead commented May 15, 2019

缘由
由于打包时候的目录名和开发时候不一样,导致无法找到断点的文件。现在是通过建立一个新的文件夹解决的,这个文件夹和打包后的文件夹同名,里面是所有源代码的拷贝,但是这样使用起来比较麻烦,比如在vscode里面打开文件、修改文件的时候要特别注意,不能打开错了文件。还有就是改完代码后,要拷贝到另一个目录。

想法
能不能增加一个目录映射的配置,例如把aaaa/bbbb与xxxx/yyyy/zzzz作映射,这样在查找文件位置时,遇到aaaa/bbbb目录就自动替换为xxxx/yyyy/zzzz,然后再查找,不知道是不是可行?

@stuartwang
Copy link
Collaborator

我重复下你遇到的情况,看下是否准确哈

比如lua文件在pc上路径 C:/GameProcect/Assets/script/test.lua
被打在手机里时,路径变成了 /data/data/com.project.test/script/test.lua

希望加一个配置项,用户输入被替换路径 /data/data/com.project.test/ 和替换成的部分路径 C:/GameProcect/Assets/
在手机上运行时,调试器完成替换流程,输出给vscode pc上的路径对么

@stuartwang
Copy link
Collaborator

如果复述没有问题的话,这个功能是可以做的。唯一的担心就是配置项太多让大家觉得配置有点复杂。我们评估一下细节然后加入近期的版本计划

@lhead
Copy link
Author

lhead commented May 16, 2019

是的,没错。
因为format = cwd + getinfo中,cwd可以配置了,但是getInfo()是运行时获取的,这里加个映射的话就方便了。

@stuartwang
Copy link
Collaborator

好的,我们近期处理一下

@stuartwang
Copy link
Collaborator

stuartwang commented May 23, 2019

dev环境下 21c2e6d
提交已修复该问题,可以自行打包插件 或 等待下一个发布版。
编译和打包方法 https://github.com/Tencent/LuaPanda/blob/master/Docs/Development-instructions/project-description.md

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