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

Adding and removing breakpoints on runtime? #32

Open
astrochili opened this issue Mar 28, 2021 · 6 comments
Open

Adding and removing breakpoints on runtime? #32

astrochili opened this issue Mar 28, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@astrochili
Copy link

astrochili commented Mar 28, 2021

It looks like the debugger updates breakpoints only on onDebuggerStop(msg).

Is it possible to update breakpoints on setBreakPointsRequest(response, args) immediately or in some timer function?

@36yang
Copy link

36yang commented Mar 29, 2021

I also want run time add remove breakPoints

@tomblind tomblind added the enhancement New feature or request label Apr 3, 2021
@tomblind
Copy link
Owner

tomblind commented Apr 3, 2021

This is challenging because lua has no built-in event loop. So, there's no straight-forward way to periodically check for incoming breakpoint changes.

A few potential options for supporting this:

  • Poll for changes directly in the debug hook. This would slow down execution A LOT. It would probably be unusable.
  • Provide a way to set an event loop manually. This would work for environments that have an update callback, but makes debugger setup more complicated.
  • If remote debugging via sockets is added (Remote Debugging Support #2), this would likely be possible via that mode.

@astrochili
Copy link
Author

astrochili commented Apr 3, 2021

  • Poll for changes directly in the debug hook. This would slow down execution A LOT. It would probably be unusable.

But what if we will call debugger.poll() from environment by a timer? Not every frame but for every second for example. Would it slow down execution?

@sneusse
Copy link

sneusse commented Apr 16, 2021

I agree with @astrochili . A debugger.pollBreakpoints() would be awesome! The performance penalty for polling once per frame would be neglectable.
This could also totally be opt-in, so If you have an event loop - use it. If not don't - and get the same behaviour like now.

@tomblind
Copy link
Owner

tomblind commented Apr 20, 2021

I think this should be do-able and useful. But I won't be able to get to it right away. It's on the roadmap though!

@MikuAuahDark
Copy link

Are there any updates on this? LOVE environment has an update loop inside love.update (called every game loop) where lldebugger can pull for new datas, but user must integrate it themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants