Add lua support through local-lua-debugger-vscode
Add the lua adapter to gadgets.py and installer.py, update the README.md file and create basic tests using lua, luajit and love.
This commit is contained in:
parent
2bdb30a45e
commit
2819e224e7
7 changed files with 185 additions and 4 deletions
63
README.md
63
README.md
|
|
@ -143,6 +143,7 @@ runtime dependencies). They are categorised by their level of support:
|
|||
| Node.js | Supported | `--force-enable-node` | vscode-node-debug2 | 6 < Node < 12, Npm |
|
||||
| Javascript | Supported | `--force-enable-chrome` | debugger-for-chrome | Chrome |
|
||||
| Java | Supported | `--force-enable-java ` | vscode-java-debug | Compatible LSP plugin (see [later](#java)) |
|
||||
| Lua | Supported | `--force-enable-lua` | local-lua-debugger-vscode | Node, Npm, Lua interpreter |
|
||||
| C# (dotnet core) | Experimental | `--force-enable-csharp` | netcoredbg | DotNet core |
|
||||
| C# (mono) | Experimental | `--force-enable-csharp` | vscode-mono-debug | Mono |
|
||||
| Python.legacy | Legacy | `--force-enable-python.legacy` | vscode-python | Node 10, Python 2.7 or Python 3 |
|
||||
|
|
@ -1309,7 +1310,7 @@ https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome
|
|||
|
||||
It allows you to debug scripts running inside chrome from within Vim.
|
||||
|
||||
* `./install_gadget.py --force-enable-chrome` or `:VimspectorInstall
|
||||
* `./install_gadget.py --force-enable-chrome` or `:VimspectorInstall
|
||||
debugger-for-chrome`
|
||||
* Example: `support/test/chrome`
|
||||
|
||||
|
|
@ -1345,7 +1346,7 @@ use it with Vimspector.
|
|||
* Set up [YCM for java][YcmJava].
|
||||
* Get Vimspector to download the java debug plugin:
|
||||
`install_gadget.py --force-enable-java <other options...>` or
|
||||
`:VimspectorInstall java-debug-adapter`
|
||||
`:VimspectorInstall java-debug-adapter`
|
||||
* Configure Vimspector for your project using the `vscode-java` adapter, e.g.:
|
||||
|
||||
```json
|
||||
|
|
@ -1410,6 +1411,60 @@ For the launch arguments, see the
|
|||
See [this issue](https://github.com/puremourning/vimspector/issues/3) for more
|
||||
background.
|
||||
|
||||
## Lua
|
||||
|
||||
Lua is supported through
|
||||
[local-lua-debugger-vscode](https://github.com/tomblind/local-lua-debugger-vscode).
|
||||
This debugger uses stdio to communicate with the running process, so calls to
|
||||
`io.read` will cause problems.
|
||||
|
||||
* `./install_gadget.py --force-enable-lua` or `:VimspectorInstall local-lua-debugger-vscode`
|
||||
* Examples: `support/test/lua/simple` and `support/test/lua/love`
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json#",
|
||||
"configurations": {
|
||||
"lua": {
|
||||
"adapter": "lua-local",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"type": "lua-local",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": {
|
||||
"lua": "lua",
|
||||
"file": "${file}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"luajit": {
|
||||
"adapter": "lua-local",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"type": "lua-local",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": {
|
||||
"lua": "luajit",
|
||||
"file": "${file}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"love": {
|
||||
"adapter": "lua-local",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"type": "lua-local",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": {
|
||||
"command": "love"
|
||||
},
|
||||
"args": ["${workspaceFolder}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Other servers
|
||||
|
||||
* Java - vscode-javac. This works, but is not as functional as Java Debug
|
||||
|
|
@ -1685,7 +1740,7 @@ augroup END
|
|||
comment](https://github.com/puremourning/vimspector/issues/90#issuecomment-577857322)
|
||||
4. Can I specify answers to the annoying questions about exception breakpoints
|
||||
in my `.vimspector.json` ? Yes, see [here][vimspector-ref-exception].
|
||||
5. Do I have to specify the file to execute in `.vimspector.json`, or could it be the current vim file?
|
||||
5. Do I have to specify the file to execute in `.vimspector.json`, or could it be the current vim file?
|
||||
You don't need to. You can specify $file for the current active file. See [here][vimspector-ref-var] for complete list of replacements in the configuration file.
|
||||
6. You allow comments in `.vimspector.json`, but Vim highlights these as errors,
|
||||
do you know how to make this not-an-error? Yes, put this in
|
||||
|
|
@ -1733,7 +1788,7 @@ A message from the author about the motivation for this plugin:
|
|||
>
|
||||
> I created Vimspector because I find changing tools frustrating. `gdb` for c++,
|
||||
> `pdb` for python, etc. Each has its own syntax. Each its own lexicon. Each its
|
||||
> own foibles.
|
||||
> own foibles.
|
||||
>
|
||||
> I designed the configuration system in such a way that the configuration can
|
||||
> be committed to source control so that it _just works_ for any of your
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue