send empty array for setbreakpoints command - #1592
Conversation
1. Problem Some debugger like matlab-lsp, It removes unused breakpoints when lsp received setbreakpoints command. Previously, set_breakpoints() function send nothing when there are no breakpoint. It makes that lsp cannot remove remained breakpoints which are set before. 2. Solution Send setbreakpoints request with empty array even though there is no breakpoints
|
Can you clarify how you run into this? If I remove the last breakpoint in a buffer I still get a |
|
When I executes There is no setbreakpoint message between Content-Length: 343
{"type":"request","arguments":{"linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","clientName":"neovim","locale
":"en_US","adapterID":"nvim-dap","clientID":"neovim","supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"
supportsVariableType":true,"supportsRunInTerminalRequest":true},"command":"initialize","seq":1}
Content-Length: 212
{"type":"request","arguments":{"program":"C:\\Users\\USER\\.config\\nvim\\test\\test.m","type":"matlab","cwd":"C:\\Users\\US
ER\\.config\\nvim","request":"launch","name":"MATLAB Debug"},"command":"launch","seq":2}
Content-Length: 56
{"type":"request","command":"configurationDone","seq":3}
Content-Length: 145
{"type":"request","arguments":{"expression":"run('C:\\Users\\USER\\.config\\nvim\\test\\test.m')","context":"repl"},"command
":"evaluate","seq":4}I created a dap adapter for matlab. To communicate between dap and lsp, I made some When I modify your code like PR, It send empty message correctly. |
That's sort of expected.
If the language server keeps the breakpoints, couldn't you just always remove breakpoints at the end of a debug session? |
chore : update recent code of original repo.
Some debugger like matlab-lsp, It removes unused breakpoints when lsp received setbreakpoints command.
Previously, set_breakpoints() function send nothing when there are no breakpoint. It makes that lsp cannot remove remained breakpoints which are set before.
Send setbreakpoints request with empty array even though there is no breakpoints