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

Breakpoints set in require-d modules not hit #18

Open
trogper opened this issue Mar 29, 2020 · 2 comments
Open

Breakpoints set in require-d modules not hit #18

trogper opened this issue Mar 29, 2020 · 2 comments

Comments

@trogper
Copy link

trogper commented Mar 29, 2020

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
Copy link
Author

trogper commented Mar 29, 2020

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
Copy link
Author

trogper commented Mar 29, 2020

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)

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