Skip to content

Commit 98bf130

Browse files
authored
Show notification for launch.json parsing errors (#1449)
1 parent f28d755 commit 98bf130

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/dap.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,12 @@ end
312312

313313
providers.configs["dap.launch.json"] = function()
314314
local ok, configs = pcall(require("dap.ext.vscode").getconfigs)
315-
return ok and configs or {}
315+
if not ok then
316+
local msg = "Can't get configurations from launch.json:\n%s" .. configs
317+
vim.notify_once(msg, vim.log.levels.WARN, {title = "DAP"})
318+
return {}
319+
end
320+
return configs
316321
end
317322

318323
do

0 commit comments

Comments
 (0)