You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's another config with "default": true and filetype is (should be) extended, it will be considered as an execution option even if the extended filetype doesn't match.
However, the config with extended filetype works well on the extended filetype.
Take the vimspector.json provided in Minimal Reproduction for example, debugging a cpp file will be asked to choose from configs, while debugging a python file will debug right away.
In my config, there are two defaults, which are launch - C family and launch - Python - default.
In launch - C family, cpp is declared in filestypes, whereas filetypes of launch - Python - default is extended from launch - Python - template which contains python only.
Then, debug a cpp file using <Plug>VimspectorContinue, and it asks me which configuration to use.
Expected Behaviour
Execute launch - C family as it's the only one matches "default" and filetype "cpp".
Actual Behaviour
Ask me to execute launch - C family or launch - Python - default
Additional information
The following log files are got after entering the debug session with config launch - C family and on a breakpoint.
Thanks for the report. This is caused because we do the filetype filtering before we do the "extends" expansion. That will require quite some refactoring. For now, I would suggest just copy the filetypes entry from where you're inheriting it from.
Description
If there's another config with
"default": true
andfiletype
is (should be) extended, it will be considered as an execution option even if the extended filetype doesn't match.However, the config with extended filetype works well on the extended filetype.
Take the
vimspector.json
provided in Minimal Reproduction for example, debugging a cpp file will be asked to choose from configs, while debugging a python file will debug right away.Works in vim?
Reproducable in Vim
Works with clean config?
Yes
Sample project works?
Reproducable with sample project
Minimal Reproduction
In
vimspector.json
, create 3 configurations:vimspector.json
In my config, there are two defaults, which are
launch - C family
andlaunch - Python - default
.In
launch - C family
,cpp
is declared infilestypes
, whereasfiletypes
oflaunch - Python - default
is extended fromlaunch - Python - template
which containspython
only.Then, debug a
cpp
file using<Plug>VimspectorContinue
, and it asks me which configuration to use.Expected Behaviour
Execute
launch - C family
as it's the only one matches "default" and filetype "cpp".Actual Behaviour
Ask me to execute
launch - C family
orlaunch - Python - default
Additional information
The following log files are got after entering the debug session with config
launch - C family
and on a breakpoint.Installation Type
Plugin Manager (git clone)
Vimspector version
3378018
Debug Info
Log file
Vim version
Python version
3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
Neovim diagnostics
Operating System
Linux LAPTOP-PRJ2HP6O 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Declaration
The text was updated successfully, but these errors were encountered: