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

debugger? #731

Open
nihildeb opened this issue May 10, 2015 · 5 comments
Open

debugger? #731

nihildeb opened this issue May 10, 2015 · 5 comments

Comments

@nihildeb
Copy link

Is there anyway to debug luvit lua? Ideally ZeroBrane, but i'd be happy if there was any possibility. I've googled and read some threads about things being broken, things being fixed, but I can't find what the current possibilities are. Thanks

@creationix
Copy link
Member

That's a great question. I've never used a lua debugger. The latest luajit is a complete rewrite over the old version, so ignore any issues from before.

@nihildeb
Copy link
Author

right now, zerobrane supports luajit debugging. you have to require
something, which I guess is not luvit's require / not compatible with
luvit's require? Is there perhaps some super secret way to start an luvi
app with just a vanilla luajit command? I know this is reaching, but I
thought I'd ask...

On Mon, May 11, 2015 at 6:57 PM, Tim Caswell notifications@github.com
wrote:

That's a great question. I've never used a lua debugger. The latest luajit
is a complete rewrite over the old version, so ignore any issues from
before.


Reply to this email directly or view it on GitHub
#731 (comment).

@creationix
Copy link
Member

luvit's require does fall back to using lua's normal require now. Just try it and see what happens.

As far as running luvi apps with normal luajit, that shouldn't be too hard, but you would need to implement the luvi APIs as a luajit library.

@imzyxwvu
Copy link

Just an idea for debugging: if your application's service loop is based on coroutines you could use debug.sethook to set a line or call hook over them, and send the debug info extracted in the hook through websockets to a web debugger. If you reimplement the debug.sethook API in C with lua_pcallk or lua_yieldk, you could even implement breakpoints. Lua's great reflection APIs is also a good reason to choose it.

@nihildeb
Copy link
Author

that is an incredibly cool idea!

I just saw this is available for python: https://github.com/Kozea/wdb

if that was available via inside luvit, i would be soooooooo happy :)
unfortunately, that would be a large commitment beyond me at the moment.

On Tue, May 12, 2015 at 3:16 AM, imzyxwvu notifications@github.com wrote:

Just an idea for debugging: if your application's service loop is based on
coroutines you could use debug.sethook to set a line or call hook over
them, and send the debug info extracted in the hook through websockets to a
web debugger. If you reimplement the debug.sethook API in C with lua_pcallk
or lua_yieldk, you could even implement breakpoints. Lua's great reflection
APIs is also a good reason to choose it.


Reply to this email directly or view it on GitHub
#731 (comment).

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

No branches or pull requests

4 participants