Giter Site home page Giter Site logo

能不能支持luajit about luapanda HOT 6 OPEN

tencent avatar tencent commented on May 22, 2024
能不能支持luajit

from luapanda.

Comments (6)

AlexStacker avatar AlexStacker commented on May 22, 2024 2

我们写Openresty的lua代码的时候也希望能用vscode调试,可以不可以顺道支持。

from luapanda.

findix avatar findix commented on May 22, 2024 2

类似 Skynet,OpenResty 不希望使用 LuaSocket 应该也是实际生产环境中,所有的 LuaSocket IO 都会阻塞 CPU 线程,OpenResty 是自己基于协程重新写了 cosocket。在调试的情况下,还是可以放心使用LuaSocket,没有问题的,理论上说,OpenResty 应该是可以直接支持 LuaPanda 没有问题的,不知道你发现了什么异常吗?

from luapanda.

stuartwang avatar stuartwang commented on May 22, 2024

先前使用slua做过一些luajit测试,我们遇到的情况是可以使用,但是单步运行体验不好,经常出现跳步等问题,猜测是luajit优化了一些call 和return,造成调试器异常。
想问下开发环境使用的是cocos2dx对么?后面我们准备先在cocos2dx中做一下测试,也在规划luajit的支持,但因为还有一些其他功能要开发,可能需要一些时间。

关于libpdebug加载成功,但不能调试的问题,目前建议关闭c调试库,尝试使用lua调试器。具体方法是修改工程中 launch.json 文件中的 useCHook 为 false 试一下

from luapanda.

stuartwang avatar stuartwang commented on May 22, 2024

我们写Openresty的lua代码的时候也希望能用vscode调试,可以不可以顺道支持。

我查了一下Openresty,其中有人提到在其中使用LuaSocket会因为网络阻塞导致异常。

永远不要在 OpenResty 使用 LuaSocket 这个库,它的网络 I/O 会阻塞 nginx 事件循环。应当总是使用OpenResty 自己的 cosocket API(ngx.socket.tcp 和 ngx.socket.udp 这些)

而目前LuaPanda正是利用LuaSocket阻塞网络使进程停止在断点处的,所以可能目前无法支持。
非常感谢建议。关于服务端的调试如果我们后面有优化,我再回复你哈。

from luapanda.

AlexStacker avatar AlexStacker commented on May 22, 2024

非常感谢回复,现在用的ZeroBraneStudio感觉不太好用,一直在寻找vscode调试的插件。
参考链接:
ZeroBraneStudio
MobDebug

from luapanda.

stuartwang avatar stuartwang commented on May 22, 2024

类似 Skynet,OpenResty 不希望使用 LuaSocket 应该也是实际生产环境中,所有的 LuaSocket IO 都会阻塞 CPU 线程,OpenResty 是自己基于协程重新写了 cosocket。在调试的情况下,还是可以放心使用LuaSocket,没有问题的,理论上说,OpenResty 应该是可以直接支持 LuaPanda 没有问题的,不知道你发现了什么异常吗?

感谢回复,这样理论上是可以用的,除了先前说的luajit需要优化的问题。 @AlexStacker 如果方便的话可以试一下哈

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.