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

修复JS在pak中的时候,VSCode Attach调试时,无法用本地的JS文件,和pak中的JS文件进行映射的问题 #1726

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhaojunmeng
Copy link
Contributor

当使用VSCode Attach到打包好的游戏调试JS时,如果JS文件在pak中,ConvertToAbsolutePathForExternalAppForRead()返回的JS文件路径,会包含"Pak: "前缀,这会导致JS路径都被识别为<node_internals>开头的;
如果使用ConvertRelativePathToFull(),pak中的JS文件路径就是不包含pak信息的绝对路径,虽然这个路径在硬盘上不存在,但是就可以用过修改launch.json中的"remoteRoot"值,来映射本地正确的JS文件,进行调试了

当使用VSCode Attach到打包好的游戏调试JS时,如果JS文件在pak中,ConvertToAbsolutePathForExternalAppForRead()返回的JS文件路径,会包含"Pak: "前缀,这会导致JS路径都被识别为<node_internals>开头的;如果使用ConvertRelativePathToFull,pak中的JS文件路径虽然变成了硬盘上的绝对路径,但是就可以用过修改launch.json中的"remoteRoot"值,来映射本地正确的JS文件,进行调试了
@zhaojunmeng zhaojunmeng marked this pull request as draft May 21, 2024 08:09
@zhaojunmeng
Copy link
Contributor Author

我的修改方案,在PC包里面有效;但是Android上面还不行,还要再研究一下

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

Successfully merging this pull request may close these issues.

None yet

1 participant