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

Missing line field in StackFrame, causes errors in Vimspector #26

Closed
ppebb opened this issue Jan 29, 2023 · 1 comment
Closed

Missing line field in StackFrame, causes errors in Vimspector #26

ppebb opened this issue Jan 29, 2023 · 1 comment

Comments

@ppebb
Copy link

ppebb commented Jan 29, 2023

Using osv with vimspector, adapter configuration:

{
    "$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json#",
    "adapters": {
        "nlua": {
            "host": "127.0.0.1",
            "port": "8086"
        }
    },

    "configurations": {
        "osv": {
            "adapter": "nlua",
            "configuration": {
                "request": "attach"
            }
        }
    }
}

Vimspector errors, and gives the logs

2023-01-29 14:06:00,878 - INFO - **** INITIALISING NEW VIMSPECTOR SESSION ****
2023-01-29 14:06:00,878 - INFO - API is: neo
2023-01-29 14:06:00,878 - INFO - VIMSPECTOR_HOME = /home/ppeb/.local/share/nvim/site/pack/packer/start/vimspector
2023-01-29 14:06:00,878 - INFO - gadgetDir = /home/ppeb/.local/share/nvim/site/pack/packer/start/vimspector/gadgets/linux
2023-01-29 14:06:00,880 - INFO - User Msg: Loaded /home/ppeb/.cache/vimspector
2023-01-29 14:06:02,840 - INFO - User requested start debug session with {}
2023-01-29 14:06:02,842 - DEBUG - Reading configurations from: None
2023-01-29 14:06:02,842 - DEBUG - Reading configurations from: /home/ppeb/gitclone/ppebboard/.vimspector.json
2023-01-29 14:06:02,843 - DEBUG - Reading gadget config: /home/ppeb/.local/share/nvim/site/pack/packer/start/vimspector/gadgets/linux/.gadgets.json
2023-01-29 14:06:02,850 - DEBUG - Reading gadget config: None
2023-01-29 14:06:02,851 - INFO - Configuration: {"adapter": "nlua", "configuration": {"request": "attach"}}
2023-01-29 14:06:02,851 - INFO - Adapter: {"host": "127.0.0.1", "port": "8086"}
2023-01-29 14:06:02,854 - DEBUG - min_width/height: 149/50, actual: 283/70 - result: horizontal
2023-01-29 14:06:02,968 - DEBUG - LAUNCH!
2023-01-29 14:06:02,974 - INFO - Starting debug adapter with: {"host": "127.0.0.1", "port": "8086"}
2023-01-29 14:06:02,974 - DEBUG - Connection Type: neochannel
2023-01-29 14:06:02,989 - INFO - Debug Adapter Started
2023-01-29 14:06:02,990 - DEBUG - Sending Message: {"command": "initialize", "arguments": {"adapterID": "adapter", "clientID": "vimspector", "clientName": "vimspector", "linesStartAt1": true, "columnsStartAt1": true, "locale": "en_GB", "pathFormat": "path", "supportsVariableType": true, "supportsVariablePaging": false, "supportsRunInTerminalRequest": true, "supportsMemoryReferences": true}, "seq": 0, "type": "request"}
2023-01-29 14:06:03,024 - DEBUG - Message received: {'seq': 1, 'request_seq': 0, 'type': 'response', 'success': True, 'body': [], 'command': 'initialize'}
2023-01-29 14:06:03,025 - DEBUG - Sending Message: {"command": "attach", "arguments": {"request": "attach", "name": "test"}, "seq": 1, "type": "request"}
2023-01-29 14:06:03,025 - DEBUG - Message received: {'seq': 2, 'type': 'event', 'event': 'initialized'}
2023-01-29 14:06:03,025 - DEBUG - Sending Message: {"command": "setBreakpoints", "arguments": {"source": {"name": "gen.lua", "path": "/home/ppeb/gitclone/ppebboard/lua/ppebboard/gen.lua"}, "breakpoints": [{"line": 37}], "sourceModified": false}, "seq": 2, "type": "request"}
2023-01-29 14:06:03,026 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 3, "type": "request"}
2023-01-29 14:06:03,091 - DEBUG - Message received: {'seq': 1, 'request_seq': 1, 'type': 'response', 'success': True, 'command': 'attach'}
2023-01-29 14:06:03,135 - DEBUG - Message received: {'seq': 2, 'request_seq': 2, 'type': 'response', 'success': True, 'body': {'breakpoints': [{'verified': True}]}, 'command': 'setBreakpoints'}
2023-01-29 14:06:03,135 - DEBUG - Message received: {'seq': 3, 'request_seq': 3, 'type': 'response', 'success': True, 'body': {'breakpoints': []}, 'command': 'setExceptionBreakpoints'}
2023-01-29 14:06:03,139 - DEBUG - Sending Message: {"command": "threads", "seq": 4, "type": "request"}
2023-01-29 14:06:03,141 - DEBUG - Message received: {'seq': 4, 'request_seq': 4, 'type': 'response', 'success': True, 'body': {'threads': [{'id': 1, 'name': 'main'}]}, 'command': 'threads'}
2023-01-29 14:06:06,493 - DEBUG - Message received: {'seq': 5, 'type': 'event', 'event': 'stopped', 'body': {'reason': 'breakpoint', 'threadId': 1}}
2023-01-29 14:06:06,494 - WARNING - User Msg: Paused in thread 1 due to breakpoint
2023-01-29 14:06:06,504 - DEBUG - Sending Message: {"command": "threads", "seq": 5, "type": "request"}
2023-01-29 14:06:06,544 - DEBUG - Message received: {'seq': 6, 'request_seq': 5, 'type': 'response', 'success': True, 'body': {'threads': [{'id': 1, 'name': 'main'}]}, 'command': 'threads'}
2023-01-29 14:06:06,545 - DEBUG - Sending Message: {"command": "stackTrace", "arguments": {"threadId": 1}, "seq": 6, "type": "request"}
2023-01-29 14:06:06,595 - DEBUG - Message received: {'seq': 7, 'request_seq': 6, 'type': 'response', 'success': True, 'body': {'stackFrames': [{'id': 1, 'name': 'create_board', 'column': 0, 'line': 37, 'source': {'path': '/home/ppeb/gitclone/ppebboard/lua/ppebboard/gen.lua', 'name': '@/home/ppeb/.local/share/nvim/site/pack/packer/start/ppebboard/lua/ppebboard/gen.lua'}}, {'id': 2, 'name': 'main'}], 'totalFrames': 2}, 'command': 'stackTrace'}

In the last line, 'stackFrames': [], the second one, {'id': 2, 'name': 'main'} is missing the line field, which is required in a StackFrame

jbyuki added a commit that referenced this issue Jan 29, 2023
@jbyuki
Copy link
Owner

jbyuki commented Jan 29, 2023

That's slightly intriguing why the source is not found, but it should now return 0 to be more in line with the spec. Thanks for precisely pointing it out!

@jbyuki jbyuki closed this as completed Jan 29, 2023
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

2 participants