Skip to content

feat(plugins): add debug.traceback#6652

Merged
Mm2PL merged 5 commits intoChatterino:masterfrom
Nerixyz:feat/plugin-traceback
Dec 28, 2025
Merged

feat(plugins): add debug.traceback#6652
Mm2PL merged 5 commits intoChatterino:masterfrom
Nerixyz:feat/plugin-traceback

Conversation

@Nerixyz
Copy link
Copy Markdown
Contributor

@Nerixyz Nerixyz commented Dec 13, 2025

I love myself a nice stack trace, so let's add Lua's debug.traceback. This can be used in xpcall as the message handler. It appends a stack trace to the message. This is really useful when testing (answering "which assert actually failed?").

The other functions of the debug library are all unsafe for us. Instead of reimplementing the function, we could also go with the approach we took for the io library. Since the traceback function is mostly a wrapper around luaL_traceback, which does the heavy lifting, I think it's fine here.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread tests/src/Plugins.cpp
Comment thread tests/src/Plugins.cpp
Comment thread tests/src/Plugins.cpp
Comment thread tests/src/Plugins.cpp
Comment thread tests/src/Plugins.cpp
Comment thread tests/src/Plugins.cpp
@pajlada pajlada requested a review from Mm2PL December 14, 2025 11:16
Comment thread src/controllers/plugins/PluginController.cpp Outdated
@Mm2PL Mm2PL enabled auto-merge (squash) December 28, 2025 11:03
@Mm2PL Mm2PL merged commit e2ba7df into Chatterino:master Dec 28, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants