-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
Add interactive debugger. #2296
base: master
Are you sure you want to change the base?
Conversation
Adds a new interactive debugger based on [debugger.lua](https://github.com/slembcke/debugger.lua). Premake already contains some remove debugger integration (MobDebug), however this PR introduces an integrated debugger, any call to `dbg()` will launch the user into an interactive GDB-like TUI shell to allow interactive debugging on the spot.
[Question] Wonder if it is not a moment to think about how to handle 3rd party in a better way |
Sure, I think it's a good idea, in all my projects I am doing that anyway. I don't mind contributing my Premake dependencies module, but I've been under the impression maybe it's not going to be accepted: https://gist.github.com/tritao/a7fdf420b66c73f32f1bff286cf7f255 I think Premake should consider having something like this, it's pretty useful. Also other systems like CMake and XMake provide this kind of abstraction these days. I have used submodules a lot in the past, and its okay, however re-using Lua and Premake seems nicer, allows defining like this: dependency {
name = "quickjs",
url = "https://github.com/quickjs-ng/quickjs.git",
path = "quickjs",
revision = "ad834a144564955941d69a47da92dfb8c1dfa67f"
} Then |
Just poking on this since it's still in draft status. RE dependency module - I'd personally be in favor of getting dependencies for Premake 6.x (and potentially landing them in 5.x after the initial release). I'm picking back up work on some of the stuff that would play nicely with a dependency system in 6.x, so it feels like a potentially natural fit [[personal opinion]]. |
@tritao does this debugger also support remote debugging because i am trying to get a premake debugger extension going on vscode (mobdebug) with some inital success might be handy if i can implement both in the extension? |
My understanding is that it's not setup as a remote debugger and is mostly usable as a local CLI debugger. I found it convenient because it does not require any setup and works out-of-the-box. Your Premake debugging extension sounds quite nice, hope you contribute that, I can help with some testing. |
yea ill ontribute it, also was just sick of having no debugging really except for zerobrain studio |
I have had success using the "Local Lua Debugger" by Tom Blind for VSCode: https://marketplace.visualstudio.com/items?itemName=tomblind.local-lua-debugger-vscode Add the following to the top of
configure your
|
this probably won't work when you have a stripped build where all the comments etc are removed from the lua files (embedded build) |
This is why the |
What does this PR do?
Adds a new interactive debugger based on debugger.lua.
Premake already contains some remote debugger integration (MobDebug), however this PR introduces an integrated debugger, any call to
dbg()
will launch the user into an interactive GDB-like TUI shell to allow interactive debugging on the spot.How does this PR change Premake's behavior?
New
dbg()
API whenPREMAKE_DEBUGGER
is enabled.Anything else we should know?
There is an
--interactive
flag already which overlaps some of the inpect functionality available in the debugger.Also the MobDebug
--debugger
flag which also provides some of the functionality, albeit in a different package.Can we just enable this debugger by default?
If not, we could re-purpose the debugger flag and allow passing a kind
--debuger=remote/mob/builtin
.Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!