{"action":"created","issue":{"url":"https://api.github.com/repos/slembcke/debugger.lua/issues/55","repository_url":"https://api.github.com/repos/slembcke/debugger.lua","labels_url":"https://api.github.com/repos/slembcke/debugger.lua/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/slembcke/debugger.lua/issues/55/comments","events_url":"https://api.github.com/repos/slembcke/debugger.lua/issues/55/events","html_url":"https://github.com/slembcke/debugger.lua/issues/55","id":375391146,"node_id":"MDU6SXNzdWUzNzUzOTExNDY=","number":55,"title":"n, f commands don't work","user":{"login":"TravellingSalesPerson","id":31338148,"node_id":"MDQ6VXNlcjMxMzM4MTQ4","avatar_url":"https://avatars0.githubusercontent.com/u/31338148?v=4","gravatar_id":"","url":"https://api.github.com/users/TravellingSalesPerson","html_url":"https://github.com/TravellingSalesPerson","followers_url":"https://api.github.com/users/TravellingSalesPerson/followers","following_url":"https://api.github.com/users/TravellingSalesPerson/following{/other_user}","gists_url":"https://api.github.com/users/TravellingSalesPerson/gists{/gist_id}","starred_url":"https://api.github.com/users/TravellingSalesPerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TravellingSalesPerson/subscriptions","organizations_url":"https://api.github.com/users/TravellingSalesPerson/orgs","repos_url":"https://api.github.com/users/TravellingSalesPerson/repos","events_url":"https://api.github.com/users/TravellingSalesPerson/events{/privacy}","received_events_url":"https://api.github.com/users/TravellingSalesPerson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-30T09:23:45Z","updated_at":"2018-10-30T12:13:04Z","closed_at":"2018-10-30T12:09:36Z","author_association":"NONE","body":"I am on Ubuntu 18.04 using lua 5.2.4.\r\n\r\nWhile running the tutorial.lua file, the following output occurred (skipping the beginning):\r\n\r\n>         Now try the 'n' command.\r\n>         (n = step to the Next line in the source code)\r\n> \r\n> tutorial.lua:85 in '<tutorial.lua:0>'\r\n> debugger.lua> n\r\n> tutorial.lua:60 in 'func2'\r\n> debugger.lua> n\r\n>         You used the 'n' command.\r\n> tutorial.lua:61 in 'func2'\r\n> debugger.lua> n\r\n>         So it's skipping over the lines in func2().\r\n> tutorial.lua:65 in 'func2'\r\n> debugger.lua> n\r\n> tutorial.lua:67 in 'func2'\r\n> debugger.lua> n\r\n> tutorial.lua:64 in 'f'\r\n> debugger.lua> n\r\n>         ... and anything it might call.\r\n\r\n\r\nBut of course, I expected:\r\n\r\n>         Now try the 'n' command.\r\n>         (n = step to the Next line in the source code)\r\n> \r\n> ./tutorial.lua:85 in '<./tutorial.lua:0>'\r\n> debugger.lua> n\r\n>         You used the 'n' command.\r\n>         So it's skipping over the lines in func2().\r\n>         ... and anything it might call.\r\n\r\nThus, it seems like `n` steps into functions just like `s` does. Likewise, using `f` inside a function simply did the same as `c` instead of stopping right after the function.\r\n\r\n I assumed `n`, `f` worked in the past, so I used git bisect and found that 4cc1189b23a80 introduced this error (`n`, `f` worked fine before 4cc1189b23a80).\r\n\r\nIn particular, this line (line 142 in 4cc1189b23a80):\r\n`return info.source:match('^@[%.%/]') ~= nil`\r\nmatches only files starting with ./\r\n\r\nThen I noticed, that `n`, `f` work properly if I run the tutorial with\r\n\r\n`lua ./tutorial.lua`\r\n\r\nbut not with\r\n\r\n`lua tutorial.lua`\r\n\r\nBecause the latter does not contain ./ and aforementioned line of code does not find a match.\r\n\r\nMaybe the pattern `'^@[%.%/]'` needs to be adapted? Or is the prefix './' always required?"},"comment":{"url":"https://api.github.com/repos/slembcke/debugger.lua/issues/comments/434276648","html_url":"https://github.com/slembcke/debugger.lua/issues/55#issuecomment-434276648","issue_url":"https://api.github.com/repos/slembcke/debugger.lua/issues/55","id":434276648,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDI3NjY0OA==","user":{"login":"aleclarson","id":1925840,"node_id":"MDQ6VXNlcjE5MjU4NDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1925840?v=4","gravatar_id":"","url":"https://api.github.com/users/aleclarson","html_url":"https://github.com/aleclarson","followers_url":"https://api.github.com/users/aleclarson/followers","following_url":"https://api.github.com/users/aleclarson/following{/other_user}","gists_url":"https://api.github.com/users/aleclarson/gists{/gist_id}","starred_url":"https://api.github.com/users/aleclarson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleclarson/subscriptions","organizations_url":"https://api.github.com/users/aleclarson/orgs","repos_url":"https://api.github.com/users/aleclarson/repos","events_url":"https://api.github.com/users/aleclarson/events{/privacy}","received_events_url":"https://api.github.com/users/aleclarson/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T12:13:04Z","updated_at":"2018-10-30T12:13:04Z","author_association":"COLLABORATOR","body":"Good analysis! 👍 \r\n\r\nI don't remember why I avoided paths like `@tutorial.lua`. I guess we'll find out.\r\n\r\nFixed by #56. Thanks for opening an issue! ❤️ \r\n\r\n"}}
{"actor":{"display_login":"aleclarson"}}