Add and document why mono debugger doesn't work

This commit is contained in:
Ben Jackson 2019-06-23 21:39:27 +01:00
commit a4db7008df
3 changed files with 116 additions and 26 deletions

View file

@ -85,6 +85,11 @@ of hackery that makes it challenging to support generally. These languages are
on a best-efforts basis:
- Java (see caveats)
- C# (c-sharp) using dotnet core
## Languages known not to work
- C# (c-sharp) using mono debug adapter (vimspector unable to set breakpoints)
## Other languages
@ -145,12 +150,14 @@ RHEL 7.6.
The debug adapters themselves have certain runtime dependencies:
| Language | Switch | Adapter | Dependencies |
|--------------|-------------------|-------------------|------------------------|
| C, C++, etc. | `--enable-c` | vscode-cpptools | mono-core |
| Python | `--enable-python` | vscode-python | Python 2.7 or Python 3 |
| TCL | `--enable-tcl` | tclpro | TCL 8.5 |
| Bourne Shell | `--enable-bash` | vscode-bash-debug | Bash v?? |
| Language | Status | Switch | Adapter | Dependencies |
|------------------|--------------|------------------------------|-------------------|------------------------|
| C, C++, etc. | Supported | `--all` or ` --enable-c` | vscode-cpptools | mono-core |
| Python | Supported | `--all` or `--enable-python` | vscode-python | Python 2.7 or Python 3 |
| TCL | Experimental | `--all` or `--enable-tcl` | tclpro | TCL 8.5 |
| Bourne Shell | Experimental | `--all` or `--enable-bash` | vscode-bash-debug | Bash v?? |
| C# (dotnet core) | Experimental | `--force-enable-csharp` | netcoredbg | DotNet core |
| C# (mono) | Experimental | `--force-enable-csharp` | vscode-mono-debug | Mono |
For other languages, you'll need some other way to install the gadget.
@ -525,6 +532,53 @@ Example `.vimspector.json`
See [my fork of TclProDebug](https://github.com/puremourning/TclProDebug) for instructions.
* C# - dotnet core
Requires `install_gadget.py --force-enable-c-sharp`
```json
{
"configurations": {
"launch - netcoredbg": {
"adapter": "netcoredbg",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.2/csharp.dll",
"args": [],
"stopAtEntry": true
}
}
}
}
```
* C# - mono
Requires `install_gadget.py --force-enable-c-sharp`.
***Known not to work.****
```json
{
"configurations": {
"launch - mono": {
"adapter": "vscode-mono-debug",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.2/csharp.dll",
"args": [],
"cwd": "${workspaceRoot}",
"runtimeExecutable": "mono",
"runtimeArgs": [],
"env": [],
"externalConsole": false,
"console": "integratedTerminal"
}
}
}
}
```
Also the mock debugger, but that isn't actually useful.
## Partially supported
@ -538,12 +592,6 @@ Also the mock debugger, but that isn't actually useful.
on which it is listening. See [this issue](https://github.com/puremourning/vimspector/issues/3)
for more background.
## Unsupported
Known not to work:
* C-sharp. The license appears to require that it is only used with Visual
Studio Code.
# FAQ
1. Q: Does it work? A: Yeah, sort of. It's _incredibly_ buggy and unpolished.

View file

@ -142,6 +142,35 @@ GADGETS = {
},
}
},
'vscode-mono-debug': {
'language': 'csharp',
'enabled': False,
'download': {
'url': 'https://marketplace.visualstudio.com/_apis/public/gallery/'
'publishers/ms-vscode/vsextensions/mono-debug/${version}/'
'vspackage',
'target': 'vscode-mono-debug.tar.gz',
'format': 'tar',
},
'all': {
'file_name': 'vscode-mono-debug.vsix',
'version': '0.15.8',
'checksum':
'723eb2b621b99d65a24f215cb64b45f5fe694105613a900a03c859a62a810470',
},
'adapters': {
'vscode-mono-debug': {
"name": "mono-debug",
"command": [
"mono",
"${gadgetDir}/vscode-mono-debug/bin/Release/mono-debug.exe"
],
"attach": {
"pidSelect": "none"
},
},
}
},
'vscode-bash-debug': {
'language': 'bash',
'download': {
@ -357,28 +386,34 @@ parser.add_argument( '--all',
action = 'store_true',
help = 'Enable all completers' )
done_languages = set()
for name, gadget in GADGETS.items():
lang = gadget[ 'language' ]
if lang in done_languages:
continue
done_languages.add( lang )
if not gadget.get( 'enabled', True ):
parser.add_argument(
'--force-enable-' + gadget[ 'language' ],
'--force-enable-' + lang,
action = 'store_true',
help = 'Install the unsupported {} debug adapter for {} support'.format(
name,
gadget[ 'language' ] ) )
lang ) )
continue
parser.add_argument(
'--enable-' + gadget[ 'language' ],
'--enable-' + lang,
action = 'store_true',
help = 'Install the {} debug adapter for {} support'.format(
name,
gadget[ 'language' ] ) )
lang ) )
parser.add_argument(
'--disable-' + gadget[ 'language' ],
'--disable-' + lang,
action = 'store_true',
help = 'Don\t install the {} debug adapter for {} support '
'(when supplying --all)'.format( name, gadget[ 'language' ] ) )
'(when supplying --all)'.format( name, lang ) )
args = parser.parse_args()

View file

@ -1,14 +1,21 @@
{
"configurations": {
"launch": {
"adapter": "netcoredbg",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.2/csharp.dll",
"args": [],
"stopAtEntry": true
}
"launch - netcoredbg": {
"adapter": "netcoredbg",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.2/csharp.dll",
"args": [],
"stopAtEntry": true
}
},
"launch - mono": {
"adapter": "vscode-mono-debug",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/Program.exe"
}
}
}
}