Skip to content

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

@tyoeer

Description

@tyoeer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions