Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[READY] Add vimspector config #1264

Merged
merged 3 commits into from Jun 16, 2019
Merged

Conversation

puremourning
Copy link
Member

@puremourning puremourning commented Jun 15, 2019

This allows debugging of ycmd tests directly using vimspector. I use a
mapping which runs the test under the cursor, so one of the variables it
asks you for it "test" which is essentially arguments to nosetests.

NOTE: It doesn't work on windows, and it requires the use of a
virtualenv at the moment. This is mainly due to a limitation of
vimspector that it only has simple variable replacement in its config.

It's actually possible to set variables based on shell commands so if the use of venv is painful for anyone else who actually uses it I can improve that.

Demo:

vimspector-YCM-debug-test

To use:

  • install Vimspector: https://puremourning.github.io/vimspector-web/. enable the HUMAN mappings (or the vs ones if you prefer. or write your own)
  • install the python debugger cd /path/to/vimspector; ./install_gadget.py --enable-python
  • open a test file and navigate to place to break, hit <F9>
  • hit <F5>
  • Test should be set to either empty (all tests) or nosetest arg such as ycmd/tests/get_completions.test:<function>
  • python_version should be 2 or 3 - this selects the regex module that gets loaded.

I also have a bunch of mappings and a compiler plugin that lets me do this with a single keystroke.

This can all be improved over time if people use it a lot.


This change is Reviewable

This allows debugging of ycmd tests directly using vimspector. I use a
mapping which runs the test under the cursor, so one of the variables it
asks you for it "test" which is essentially arguments to nosetests.

NOTE: It doesn't work on windows, and it requires the use of a
virtualenv at the moment. This is mainly due to a limitation of
vimspector that it only has simple variable replacement in its config.
@puremourning puremourning changed the title [READYAdd vimspector config [READY] Add vimspector config Jun 15, 2019
@bstaletic
Copy link
Collaborator

bstaletic commented Jun 16, 2019

The configuration works (not that I doubted it), therefore :lgtm:.

@puremourning
Copy link
Member Author

great. let's ship it.

@puremourning puremourning added the Ship It! Manual override to merge a PR by maintainer label Jun 16, 2019
Copy link
Collaborator

@bstaletic bstaletic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: 1 of 2 LGTMs obtained

@mergify
Copy link
Contributor

mergify bot commented Jun 16, 2019

Thanks for sending a PR!

@codecov
Copy link

codecov bot commented Jun 16, 2019

Codecov Report

Merging #1264 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1264   +/-   ##
=======================================
  Coverage   97.46%   97.46%           
=======================================
  Files          95       95           
  Lines        7260     7260           
  Branches      153      153           
=======================================
  Hits         7076     7076           
  Misses        143      143           
  Partials       41       41

@codecov
Copy link

codecov bot commented Jun 16, 2019

Codecov Report

Merging #1264 into master will decrease coverage by 0.28%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #1264      +/-   ##
=========================================
- Coverage   97.39%   97.1%   -0.29%     
=========================================
  Files          95      95              
  Lines        7294    7259      -35     
  Branches      153     153              
=========================================
- Hits         7104    7049      -55     
- Misses        149     169      +20     
  Partials       41      41

@mergify mergify bot merged commit 9519216 into ycm-core:master Jun 16, 2019
@mergify
Copy link
Contributor

mergify bot commented Jun 16, 2019

Thanks for sending a PR!

bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 3, 2019
ycm-core/ycmd#1275 Remap python GoTo* commands
ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn
ycm-core/ycmd#1239 Error ID in diagnostic messages
ycm-core/ycmd#1267 Clangd extra conf support
ycm-core/ycmd#1266 JDT update to 0.40.0
ycm-core/ycmd#1245 Generic (pluggable) LSP completer support
ycm-core/ycmd#1263 Support JDT extensions
ycm-core/ycmd#1261 Typescript update
ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration
ycm-core/ycmd#1262 Multi-user installation
ycm-core/ycmd#1243 Migrate to GOPLS
ycm-core/ycmd#1249 Support MSVC 16 (VS2019)
ycm-core/ycmd#1224 Migrate to RLS
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 4, 2019
ycm-core/ycmd#1275 Remap python GoTo* commands
ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn
ycm-core/ycmd#1239 Error ID in diagnostic messages
ycm-core/ycmd#1267 Clangd extra conf support
ycm-core/ycmd#1266 JDT update to 0.40.0
ycm-core/ycmd#1245 Generic (pluggable) LSP completer support
ycm-core/ycmd#1263 Support JDT extensions
ycm-core/ycmd#1261 Typescript update
ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration
ycm-core/ycmd#1262 Multi-user installation
ycm-core/ycmd#1243 Migrate to GOPLS
ycm-core/ycmd#1249 Support MSVC 16 (VS2019)
ycm-core/ycmd#1224 Migrate to RLS
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 4, 2019
ycm-core/ycmd#1275 Remap python GoTo* commands
ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn
ycm-core/ycmd#1239 Error ID in diagnostic messages
ycm-core/ycmd#1267 Clangd extra conf support
ycm-core/ycmd#1266 JDT update to 0.40.0
ycm-core/ycmd#1245 Generic (pluggable) LSP completer support
ycm-core/ycmd#1263 Support JDT extensions
ycm-core/ycmd#1261 Typescript update
ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration
ycm-core/ycmd#1262 Multi-user installation
ycm-core/ycmd#1243 Migrate to GOPLS
ycm-core/ycmd#1249 Support MSVC 16 (VS2019)
ycm-core/ycmd#1224 Migrate to RLS
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 4, 2019
ycm-core/ycmd#1275 Remap python GoTo* commands
ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn
ycm-core/ycmd#1239 Error ID in diagnostic messages
ycm-core/ycmd#1267 Clangd extra conf support
ycm-core/ycmd#1266 JDT update to 0.40.0
ycm-core/ycmd#1245 Generic (pluggable) LSP completer support
ycm-core/ycmd#1263 Support JDT extensions
ycm-core/ycmd#1261 Typescript update
ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration
ycm-core/ycmd#1262 Multi-user installation
ycm-core/ycmd#1243 Migrate to GOPLS
ycm-core/ycmd#1249 Support MSVC 16 (VS2019)
ycm-core/ycmd#1224 Migrate to RLS
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 5, 2019
ycm-core/ycmd#1275 Remap python GoTo* commands
ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn
ycm-core/ycmd#1239 Error ID in diagnostic messages
ycm-core/ycmd#1267 Clangd extra conf support
ycm-core/ycmd#1266 JDT update to 0.40.0
ycm-core/ycmd#1245 Generic (pluggable) LSP completer support
ycm-core/ycmd#1263 Support JDT extensions
ycm-core/ycmd#1261 Typescript update
ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration
ycm-core/ycmd#1262 Multi-user installation
ycm-core/ycmd#1243 Migrate to GOPLS
ycm-core/ycmd#1249 Support MSVC 16 (VS2019)
ycm-core/ycmd#1224 Migrate to RLS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ship It! Manual override to merge a PR by maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants