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

core: add enhanced debug info #1989

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

takase1121
Copy link
Member

@takase1121 takase1121 commented Dec 15, 2024

This PR adds enhanced debug information that can help us debug stuff, I can't be bothered to list all of them out so here is an example:

Error: [string "init_lite_code"]:42: what

stack traceback:
        [C]: in function 'error'
        [string "init_lite_code"]:42: in function <[string "init_lite_code"]:33>
        [C]: in function 'xpcall'
        [string "init_lite_code"]:33: in main chunk

Debug Information
=================
ARCH: x86_64-linux
ARGS: {"./lite-xl"}
CFLAGS: -DSDL_MAIN_HANDLED -DPCRE2_STATIC -DLITE_ARCH_TUPLE='x86_64-linux'
DATADIR: /home/takase/gh/lite-xl/build/src/data
EXEFILE: /home/takase/gh/lite-xl/build/src/lite-xl
FreeType: 2.13.3
LDFLAGS: 
Lite XL: @PROJECT_VERSION@
MOD_VERSION: 3.0.0
PCRE2: 10.44
PLATFORM: Linux
SDL: 2.30.10
USERDIR: /home/takase/gh/lite-xl/build/src/user
start.lua: /home/takase/gh/lite-xl/build/src/data/core/start.lua
video_driver: x11

Environment
===========
HOME=/home/takase
XDG_CONFIG_DIRS=/home/takase/.config/kdedefaults:/etc/xdg
XDG_CURRENT_DESKTOP=KDE
XDG_MENU_PREFIX=plasma-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SESSION_TYPE=wayland
XDG_VTNR=2

The PR also adds a name to init_lite_code, but well not sure how that'd help.

@takase1121
Copy link
Member Author

Now we can get CFLAGS/LDFLAGS, but the method is kinda hackish and I just want to get some opinion on this. If this is fine, then we can add it properly with cfg_data.

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

Successfully merging this pull request may close these issues.

1 participant