lua-debug icon indicating copy to clipboard operation
lua-debug copied to clipboard

Shebang on first line causes breakpoint to be ignored - issue regression?

Open s6mike opened this issue 3 years ago • 2 comments

Hi, I'm using this extension for the first time, and I'm getting the problem described in this closed issue: https://github.com/actboy168/lua-debug/issues/153.

To reproduce, add breakpoint to this file:

#!/usr/bin/env lua print(_VERSION) print 'Hello, World!' print 'Hello, World2!'

breakpoints grey out as soon as I launch debugger.

Commenting out #! line fixes this.

Environment: launch.json: { "arg": [], "name": "launch", "program": "${file}", "request": "launch", "stopOnEntry": false, "type": "lua" },

Extension: v1.58.2 Lua v5.3.4

VSCode: Version: 1.68.1 Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630 Date: 2022-06-15T02:58:26.441Z Electron: 17.4.7 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Linux x64 5.10.110-15808-ge5740beba59b

s6mike avatar Jun 30 '22 11:06 s6mike

I can't reproduce it.

actboy168 avatar Jul 01 '22 03:07 actboy168

Thanks for trying.

I've just reproduced it with all extensions disabled apart from the debugger and your extensionPath.

Here's a screen recording of me fixing it by commenting out the shebang: https://drive.google.com/file/d/1cy9defZTLnc9nS_2nDyk4E5YB3aQfdjt/view?usp=sharing

Is there any additional info I can provide to help you diagnose the issue? Extra logging output or similar?

s6mike avatar Jul 01 '22 05:07 s6mike

I've just realised that the breakpoints sometimes work, but they don't stop at the line I put the breakpoint on.

Before that, after I hit the debug button, the breakpoints get moved around, some of them disappear. If they end up on a line with code in them then the breakpoint works.

If I remove the shebang, the breakpoints don't move around after I hit the debug button.

(v1.60.1)

s6mike avatar Oct 27 '22 11:10 s6mike