satoren / LRDB

Lua Remote DeBugger
Boost Software License 1.0
62 stars 21 forks source link

Breakpoints set in require-d modules not hit #18

Open trogper opened 4 years ago

trogper commented 4 years ago

I have created simple "module" printk.lua, which only prints several numbers and exports a function if I execute it with dofile, breakpoints in the file get hit, but if I require it, the breakpoints don't get hit. Stepping inside required files works fine, just the breakpoints do not

trogper commented 4 years ago

so I have found out the lua debug interface provides absolute path in source field (file path) for require-d modules/files and relative paths for dofile executed files

trogper commented 4 years ago

I suggest always using absolute paths and prepending path from debuginfo.source() with cwd, when it is relative. I think this would also solve issue #17 and simplify sourceRoot path resolving (see my fork)