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

lldebugger changes the slash in file paths in debug.traceback() when active #69

Open
tyoeer opened this issue Aug 21, 2022 · 0 comments

Comments

@tyoeer
Copy link

tyoeer commented Aug 21, 2022

When using debug.traceback(), the slashes in the file paths change from / to \ when the debugger is started.
This is an issue because I was string pattern matching the traceback to only get the relevant part, and the slash change actually caused that to fail all the way up into a crash.

Minimal reproduction code (using LÖVE):
In main.lua:

require("test.test")

In test/test.lua:

print(debug.traceback())
require("lldebugger").start()
print(debug.traceback())

Output:

stack traceback:
	test/test.lua:1: in main chunk
	[C]: in function 'require'
	main.lua:1: in main chunk
	[C]: in function 'require'
	[love "boot.lua"]:316: in function <[love "boot.lua"]:126>
	[C]: in function 'xpcall'
	[love "boot.lua"]:355: in function <[love "boot.lua"]:348>
	[C]: in function 'xpcall'
	[love "boot.lua"]:370: in function <[love "boot.lua"]:337>

stack traceback:
	test\test.lua:3: in main chunk
	[C]: in function 'require'
	main.lua:1: in main chunk
	[C]: in function 'require'
	[love "boot.lua"]:316: in function <[love "boot.lua"]:126>
	[C]: in function 'xpcall'
	[love "boot.lua"]:355: in function <[love "boot.lua"]:348>
	[C]: in function 'xpcall'
	[love "boot.lua"]:370: in function <[love "boot.lua"]:337>

I'm using LÖVE 11.4 on WIndows 10 if that matters.

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

1 participant