其他编辑器
调试器是 kscript debug,它通过标准输入和标准输出使用 Debug Adapter Protocol。VS Code 会自动为你启动它。任何支持 Debug Adapter Protocol 客户端的编辑器也可以启动它,例如使用 nvim-dap 的 Neovim:
local dap = require('dap')
dap.adapters.kscript = { type = 'executable', command = 'kscript', args = { 'debug' } }
dap.configurations.kscript = {
{ type = 'kscript', request = 'launch', name = 'Debug script', program = '${file}' },
}它采用上方的launch设置,并支持带条件的断点、命中次数、日志消息、错误过滤器、单步执行、暂停,以及用于悬停、监视和控制台的表达式求值。