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

Debug: just doesn'to work #20

Open
BartolomeyKant opened this issue Nov 26, 2024 · 5 comments
Open

Debug: just doesn'to work #20

BartolomeyKant opened this issue Nov 26, 2024 · 5 comments

Comments

@BartolomeyKant
Copy link

BartolomeyKant commented Nov 26, 2024

I configured Debuger with target binary in my ~/.config/lite-xl/init.lua

config.target_binary = "absolute path to executable binary"

Pressing Debugger: Start Or Continue just doing nothing.

@adamharrison
Copy link
Member

Hrm. Odd. That should work, but there's interplay with build and debugger if you have both installed (it uses your build targets to set target_binary).

If build's not working right now for you (based on the other issue), try uninstalling it and only using debugger; that may help.

@BartolomeyKant
Copy link
Author

Hrm. Odd. That should work, but there's interplay with build and debugger if you have both installed (it uses your build targets to set target_binary).

Ok. I found the problem. I made a typo in config.target_binary and system.get_file_info had always return nil.

Now debugger started but if I add a breakpoint whole lite xl crushes.

Error: /usr/share/lite-xl/core/docview.lua:444: bad argument #1 to 'sub' (string expected, got nil)

stack traceback:
	[C]: in function 'string.sub'
	/usr/share/lite-xl/core/docview.lua:444: in upvalue 'draw_line_text'
	/home/bartolomey/.config/lite-xl/plugins/codeplus/init.lua:68: in function </home/bartolomey/.config/lite-xl/plugins/codeplus/init.lua:67>
	(...tail calls...)
	/home/bartolomey/.config/lite-xl/plugins/bracketmatch.lua:236: in upvalue 'draw_line_text'
	/home/bartolomey/.config/lite-xl/plugins/colorpreview.lua:74: in function </home/bartolomey/.config/lite-xl/plugins/colorpreview.lua:73>
	(...tail calls...)
	/usr/share/lite-xl/core/docview.lua:585: in upvalue 'docview_draw'
	/home/bartolomey/.config/lite-xl/plugins/debugger/init.lua:250: in upvalue 'old_draw'
	/usr/share/lite-xl/plugins/linewrapping.lua:529: in upvalue 'parent_draw'
	/home/bartolomey/.config/lite-xl/plugins/gitblame/init.lua:145: in function </home/bartolomey/.config/lite-xl/plugins/gitblame/init.lua:144>
	(...tail calls...)
	/home/bartolomey/.config/lite-xl/plugins/debugger/init.lua:385: in method 'draw'
	...	(skipping 15 levels)
	...y/.config/lite-xl/plugins/plugin_manager/plugin_view.lua:66: in upvalue 'draw'
	/usr/share/lite-xl/plugins/autocomplete.lua:598: in upvalue 'root_view_draw'
	/usr/share/lite-xl/plugins/contextmenu.lua:32: in upvalue 'root_view_draw'
	/usr/share/lite-xl/plugins/treeview.lua:498: in upvalue 'root_view_draw'
	/home/bartolomey/.config/lite-xl/plugins/lsp/listbox.lua:520: in upvalue 'root_view_draw'
	/home/bartolomey/.config/lite-xl/libraries/widget/init.lua:1468: in function 'core.rootview.draw'
	/usr/share/lite-xl/core/init.lua:1341: in function 'core.step'
	/usr/share/lite-xl/core/init.lua:1401: in function 'core.run'
	(...tail calls...)
	[string "local core..."]:14: in function <[string "local core..."]:6>
	[C]: in function 'xpcall'
	[string "local core..."]:6: in main chunk

@adamharrison
Copy link
Member

Hrm. I don't use codeplus, could be something to do with that. Not sure. I'll look into it.

@BartolomeyKant
Copy link
Author

I just remove codeplus and got the same error

Error: /usr/share/lite-xl/core/docview.lua:444: bad argument #1 to 'sub' (string expected, got nil)

stack traceback:
	[C]: in function 'string.sub'
	/usr/share/lite-xl/core/docview.lua:444: in function </usr/share/lite-xl/core/docview.lua:438>
	(...tail calls...)
	/home/bartolomey/.config/lite-xl/plugins/bracketmatch.lua:236: in upvalue 'draw_line_text'
	/home/bartolomey/.config/lite-xl/plugins/colorpreview.lua:74: in function </home/bartolomey/.config/lite-xl/plugins/colorpreview.lua:73>
	(...tail calls...)
	/usr/share/lite-xl/core/docview.lua:585: in upvalue 'docview_draw'
	/home/bartolomey/.config/lite-xl/plugins/debugger/init.lua:250: in upvalue 'old_draw'
	/usr/share/lite-xl/plugins/linewrapping.lua:529: in upvalue 'parent_draw'
	/home/bartolomey/.config/lite-xl/plugins/gitblame/init.lua:145: in function </home/bartolomey/.config/lite-xl/plugins/gitblame/init.lua:144>
	(...tail calls...)
	/home/bartolomey/.config/lite-xl/plugins/debugger/init.lua:385: in method 'draw'
	/usr/share/lite-xl/core/node.lua:592: in function 'core.node.draw'
	...	(skipping 14 levels)
	...y/.config/lite-xl/plugins/plugin_manager/plugin_view.lua:66: in upvalue 'draw'
	/usr/share/lite-xl/plugins/autocomplete.lua:598: in upvalue 'root_view_draw'
	/usr/share/lite-xl/plugins/contextmenu.lua:32: in upvalue 'root_view_draw'
	/usr/share/lite-xl/plugins/treeview.lua:498: in upvalue 'root_view_draw'
	/home/bartolomey/.config/lite-xl/plugins/lsp/listbox.lua:520: in upvalue 'root_view_draw'
	/home/bartolomey/.config/lite-xl/libraries/widget/init.lua:1468: in function 'core.rootview.draw'
	/usr/share/lite-xl/core/init.lua:1341: in function 'core.step'
	/usr/share/lite-xl/core/init.lua:1401: in function 'core.run'
	(...tail calls...)
	[string "local core..."]:14: in function <[string "local core..."]:6>
	[C]: in function 'xpcall'
	[string "local core..."]:6: in main chunk

@adamharrison
Copy link
Member

No idea then. Could be a distinction between what lxl I'm running and your version (it should be functional on 2.1.5, but my main driver is the RC for 3.0).

I'll take a look.

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

No branches or pull requests

2 participants