Code Monkey home page Code Monkey logo

Comments (2)

weng7654 avatar weng7654 commented on May 25, 2024

顺便问下,把路径的. 都替换成/是有什么考量吗,如果项目路径带.的,不同的lua文件夹没有公共部分会导致无法命中断点

from luapanda.

stuartwang avatar stuartwang commented on May 25, 2024

问题收到,我最近会看一下,目前确实对路径中的异常字符处理的不好。所以如果可以路径中尽量不使用特殊字符。

关于 . 替换成 / 的原因,现在假设a文件夹下存在b.lua ,那么require这个文件的方式可以是

require("a/b")  或者
require("a.b")

因为lua require中 . 和 / 同义,代表一级目录,用户可以用上面任何一种写法,而用户写的a/b或者a.b这个路径最终会被调试器获得,用于做断点命中比对。

调试前端发过来的路径肯定是 a/b,为了路径比对能够成功,兼容a.b的写法,所以我们把路径中的 . 整体提换成了 / ,所以这要要求用户路径中不能出现 "." ,会造成你上面遇到的问题

from luapanda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.