puremourning / vimspector

vimspector - A multi-language debugging system for Vim
http://puremourning.github.io/vimspector-web
Apache License 2.0
4.1k stars 175 forks source link

filetype isn't extended and cause wrong default configuration selectable #670

Open timsu92 opened 2 years ago

timsu92 commented 2 years ago

Description

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.

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 ```json { "$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json#", "configurations": { "launch - C family": { "adapter": "vscode-cpptools", "default": true, "filetypes": [ "cpp", "c", "objc", "rust" ], "configuration": { "type":"cppdbg", "request": "launch", "program": "${workspaceRoot}/a.out", "args": [], "cwd": "${workspaceRoot}", "environment": [], "externalConsole": true, "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ], "stopAtEntry": false }, "breakpoints": { "exception": { "cpp_catch": "N", "cpp_throw": "Y", "all": "Y" } } }, "launch - Python - template":{ "adapter":"debugpy", "filetypes": ["python"], "configuration": { "type": "python", "request": "launch", "console": "externalTerminal", "python": "${PYTHON}" }, "breakpoints": { "exception": { "raised": "N", "uncaught": "Y", "userUnhandled": "Y" } }, "variables":{ "PYTHON":{ "shell": ["which", "python"] } }, "autoselect": false }, "launch - Python - default":{ "extends": "launch - Python - template", "default": true, "configuration": { "cwd": "${workspaceRoot}", "program": "${relativeFile}" } } } } ```

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.

Installation Type

Plugin Manager (git clone)

Vimspector version

3378018bc1cdd1d9b70734c3e970bc52fd983415

Debug Info

Vimspector Debug Info
--------------------------------------------------------------------------------
ConnectionType: job
Adapter: 
--------------------------------------------------------------------------------
{
  "attach": {
    "pidProperty": "processId",
    "pidSelect": "ask"
  },
  "command": [
    "/home/tim/.vim/plugged/vimspector/gadgets/linux/vscode-cpptools/debugAdapters/bin/OpenDebugAD7"
  ],
  "configuration": {
    "args": [],
    "cwd": "/home/tim",
    "environment": [],
    "type": "cppdbg"
  },
  "name": "cppdbg",
  "env": {},
  "cwd": "/home/tim"
}
--------------------------------------------------------------------------------
Configuration: 
--------------------------------------------------------------------------------
{
  "adapter": "vscode-cpptools",
  "default": true,
  "filetypes": [
    "cpp",
    "c",
    "objc",
    "rust"
  ],
  "configuration": {
    "type": "cppdbg",
    "request": "launch",
    "program": "/home/tim/a.out",
    "args": [],
    "cwd": "/home/tim",
    "environment": [],
    "externalConsole": true,
    "MIMode": "gdb",
    "setupCommands": [
      {
        "description": "Enable pretty-printing for gdb",
        "text": "-enable-pretty-printing",
        "ignoreFailures": true
      }
    ],
    "stopAtEntry": false
  },
  "breakpoints": {
    "exception": {
      "cpp_catch": "N",
      "cpp_throw": "Y",
      "all": "Y"
    }
  }
}
--------------------------------------------------------------------------------
API Prefix: 
Launch/Init: True / True
Workspace Root: /home/tim
Launch Config: 
--------------------------------------------------------------------------------
{
  "args": [],
  "cwd": "/home/tim",
  "environment": [],
  "type": "cppdbg",
  "request": "launch",
  "program": "/home/tim/a.out",
  "externalConsole": true,
  "MIMode": "gdb",
  "setupCommands": [
    {
      "description": "Enable pretty-printing for gdb",
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    }
  ],
  "stopAtEntry": false,
  "name": "test"
}
--------------------------------------------------------------------------------
Server Capabilities: 
--------------------------------------------------------------------------------
{
  "supportsConfigurationDoneRequest": true,
  "supportsFunctionBreakpoints": true,
  "supportsConditionalBreakpoints": true,
  "supportsEvaluateForHovers": true,
  "exceptionBreakpointFilters": [
    {
      "filter": "all",
      "label": "All C++ Exceptions",
      "default": false,
      "supportsCondition": true,
      "conditionDescription": "std::out_of_range,std::invalid_argument"
    }
  ],
  "supportsSetVariable": true,
  "supportsGotoTargetsRequest": true,
  "supportsCompletionsRequest": true,
  "completionTriggerCharacters": [],
  "supportsModulesRequest": true,
  "supportedChecksumAlgorithms": [],
  "supportsValueFormattingOptions": true,
  "supportsLogPoints": true,
  "supportsSetExpression": true,
  "supportsDataBreakpoints": true,
  "supportsReadMemoryRequest": true,
  "supportsDisassembleRequest": true,
  "supportsClipboardContext": true,
  "supportsSteppingGranularity": true,
  "supportsInstructionBreakpoints": true,
  "supportsExceptionFilterOptions": true
}
--------------------------------------------------------------------------------
Line Breakpoints: 
--------------------------------------------------------------------------------
{
  "/home/tim/ctest.cc": [
    {
      "state": "ENABLED",
      "line": 5,
      "options": {},
      "sign_id": 1,
      "server_bp": {
        "id": 1,
        "verified": true,
        "line": 5,
        "BoundBreakpoints": []
      }
    }
  ]
}
--------------------------------------------------------------------------------
Func Breakpoints: 
--------------------------------------------------------------------------------
[]
--------------------------------------------------------------------------------
Ex Breakpoints: 
--------------------------------------------------------------------------------
{
  "filters": [
    "all"
  ]
}
--------------------------------------------------------------------------------

Log file

2022-09-19 11:30:16,491 - INFO - **** INITIALISING NEW VIMSPECTOR SESSION ****
2022-09-19 11:30:16,491 - INFO - API is: 
2022-09-19 11:30:16,491 - INFO - VIMSPECTOR_HOME = /home/tim/.vim/plugged/vimspector
2022-09-19 11:30:16,491 - INFO - gadgetDir = /home/tim/.vim/plugged/vimspector/gadgets/linux
2022-09-19 11:30:16,491 - INFO - User Msg: Loaded /home/tim/.vim/view/+home+tim+ctest.cc.vimspector.session.json
2022-09-19 11:30:48,020 - INFO - User requested start debug session with {}
2022-09-19 11:30:48,020 - DEBUG - Reading configurations from: /home/tim/.vim/plugged/vimspector/configurations/linux/_all/vimspector.json
2022-09-19 11:30:48,023 - DEBUG - Reading configurations from: None
2022-09-19 11:30:48,023 - DEBUG - Reading configurations from: None
2022-09-19 11:30:48,023 - DEBUG - Reading gadget config: /home/tim/.vim/plugged/vimspector/gadgets/linux/.gadgets.json
2022-09-19 11:30:48,025 - DEBUG - Reading gadget config: None
2022-09-19 11:30:49,192 - INFO - Configuration: {"adapter": "vscode-cpptools", "default": true, "filetypes": ["cpp", "c", "objc", "rust"], "configuration": {"type": "cppdbg", "request": "launch", "program": "/home/tim/a.out", "args": [], "cwd": "/home/tim", "environment": [], "externalConsole": true, "MIMode": "gdb", "setupCommands": [{"description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true}], "stopAtEntry": false}, "breakpoints": {"exception": {"cpp_catch": "N", "cpp_throw": "Y", "all": "Y"}}}
2022-09-19 11:30:49,192 - INFO - Adapter: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/home/tim/.vim/plugged/vimspector/gadgets/linux/vscode-cpptools/debugAdapters/bin/OpenDebugAD7"], "configuration": {"args": [], "cwd": "/home/tim", "environment": [], "type": "cppdbg"}, "name": "cppdbg"}
2022-09-19 11:30:49,192 - DEBUG - min_width/height: 149/50, actual: 110/53 - result: vertical
2022-09-19 11:30:49,205 - DEBUG - LAUNCH!
2022-09-19 11:30:49,206 - INFO - Starting debug adapter with: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/home/tim/.vim/plugged/vimspector/gadgets/linux/vscode-cpptools/debugAdapters/bin/OpenDebugAD7"], "configuration": {"args": [], "cwd": "/home/tim", "environment": [], "type": "cppdbg"}, "name": "cppdbg"}
2022-09-19 11:30:49,206 - DEBUG - Connection Type: job
2022-09-19 11:30:49,445 - INFO - Debug Adapter Started
2022-09-19 11:30:49,446 - DEBUG - Sending Message: {"command": "initialize", "arguments": {"adapterID": "cppdbg", "clientID": "vimspector", "clientName": "vimspector", "linesStartAt1": true, "columnsStartAt1": true, "locale": "en_GB", "pathFormat": "path", "supportsVariableType": true, "supportsVariablePaging": false, "supportsRunInTerminalRequest": true, "supportsMemoryReferences": true}, "seq": 0, "type": "request"}
2022-09-19 11:30:49,771 - DEBUG - Message received: {'type': 'response', 'request_seq': 0, 'success': True, 'command': 'initialize', 'body': {'supportsConfigurationDoneRequest': True, 'supportsFunctionBreakpoints': True, 'supportsConditionalBreakpoints': True, 'supportsEvaluateForHovers': True, 'exceptionBreakpointFilters': [{'filter': 'all', 'label': 'All C++ Exceptions', 'default': False, 'supportsCondition': True, 'conditionDescription': 'std::out_of_range,std::invalid_argument'}], 'supportsSetVariable': True, 'supportsGotoTargetsRequest': True, 'supportsCompletionsRequest': True, 'completionTriggerCharacters': [], 'supportsModulesRequest': True, 'supportedChecksumAlgorithms': [], 'supportsValueFormattingOptions': True, 'supportsLogPoints': True, 'supportsSetExpression': True, 'supportsDataBreakpoints': True, 'supportsReadMemoryRequest': True, 'supportsDisassembleRequest': True, 'supportsClipboardContext': True, 'supportsSteppingGranularity': True, 'supportsInstructionBreakpoints': True, 'supportsExceptionFilterOptions': True}, 'seq': 1}
2022-09-19 11:30:49,771 - DEBUG - Sending Message: {"command": "launch", "arguments": {"args": [], "cwd": "/home/tim", "environment": [], "type": "cppdbg", "request": "launch", "program": "/home/tim/a.out", "externalConsole": true, "MIMode": "gdb", "setupCommands": [{"description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true}], "stopAtEntry": false, "name": "test"}, "seq": 1, "type": "request"}
2022-09-19 11:30:49,814 - DEBUG - Message received: {'type': 'request', 'command': 'runInTerminal', 'arguments': {'kind': 'external', 'title': 'cppdbg: a.out', 'cwd': '', 'args': ['/bin/sh', '/tmp/Microsoft-MIEngine-Cmd-gruufnvn.cnm'], 'env': {}}, 'seq': 2}
2022-09-19 11:30:49,814 - DEBUG - Defaulting working directory to /home/tim
2022-09-19 11:30:49,817 - DEBUG - Sending Message: {"seq": 2, "type": "response", "request_seq": 2, "command": "runInTerminal", "body": {"processId": 1956}, "success": true}
2022-09-19 11:30:50,086 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'telemetry', 'output': 'VS/Diagnostics/Debugger/Launch', 'data': {'VS.Diagnostics.Debugger.ImplementationName': 'Microsoft.MIDebugEngine', 'VS.Diagnostics.Debugger.EngineVersion': '17.1.20608.1', 'VS.Diagnostics.Debugger.HostVersion': '17.1.20608.1', 'VS.Diagnostics.Debugger.AdapterId': 'cppdbg', 'VS.Diagnostics.Debugger.Launch.Duration': 109, 'VS.Diagnostics.Debugger.MIMode': 'gdb', 'VS.Diagnostics.Debugger.FrameworkVersion': '6.0.522.21309'}}, 'seq': 3}
2022-09-19 11:30:50,087 - DEBUG - Message received: {'type': 'response', 'request_seq': 1, 'success': True, 'command': 'launch', 'body': {}, 'seq': 4}
2022-09-19 11:30:50,087 - DEBUG - Message received: {'type': 'event', 'event': 'initialized', 'body': {}, 'seq': 5}
2022-09-19 11:30:50,087 - DEBUG - Sending Message: {"command": "setBreakpoints", "arguments": {"source": {"name": "ctest.cc", "path": "/home/tim/ctest.cc"}, "breakpoints": [{"line": 5}], "sourceModified": false}, "seq": 3, "type": "request"}
2022-09-19 11:30:50,087 - DEBUG - Sending Message: {"command": "setFunctionBreakpoints", "arguments": {"breakpoints": []}, "seq": 4, "type": "request"}
2022-09-19 11:30:50,087 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": ["all"]}, "seq": 5, "type": "request"}
2022-09-19 11:30:50,334 - DEBUG - Message received: {'type': 'response', 'request_seq': 3, 'success': True, 'command': 'setBreakpoints', 'body': {'breakpoints': [{'id': 1, 'verified': True, 'line': 5, 'BoundBreakpoints': []}]}, 'seq': 6}
2022-09-19 11:30:50,334 - DEBUG - Message received: {'type': 'event', 'event': 'breakpoint', 'body': {'reason': 'changed', 'breakpoint': {'id': 1, 'verified': True, 'line': 5, 'BoundBreakpoints': []}}, 'seq': 7}
2022-09-19 11:30:50,335 - DEBUG - Message received: {'type': 'response', 'request_seq': 4, 'success': True, 'command': 'setFunctionBreakpoints', 'body': {'breakpoints': []}, 'seq': 8}
2022-09-19 11:30:50,335 - DEBUG - Message received: {'type': 'response', 'request_seq': 5, 'success': True, 'command': 'setExceptionBreakpoints', 'body': {}, 'seq': 9}
2022-09-19 11:30:50,335 - DEBUG - Sending Message: {"command": "configurationDone", "seq": 6, "type": "request"}
2022-09-19 11:30:50,454 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': '=thread-group-added,id="i1"\nGNU gdb (Ubuntu 12.0.90-0ubuntu1) 12.0.90\nCopyright (C) 2022 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\nType "show copying" and "show warranty" for details.\nThis GDB was configured as "x86_64-linux-gnu".\nType "show configuration" for configuration details.\nFor bug reporting instructions, please see:\n<https://www.gnu.org/software/gdb/bugs/>.\nFind the GDB manual and other documentation resources online at:\n    <http://www.gnu.org/software/gdb/documentation/>.\n\nFor help, type "help".\nType "apropos word" to search for commands related to "word".\nWarning: Debuggee TargetArchitecture not detected, assuming x86_64.\n=cmd-param-changed,param="pagination",value="off"\n'}, 'seq': 11}
2022-09-19 11:30:50,454 - DEBUG - Message received: {'type': 'response', 'request_seq': 6, 'success': True, 'command': 'configurationDone', 'body': {}, 'seq': 10}
2022-09-19 11:30:50,455 - DEBUG - Sending Message: {"command": "threads", "seq": 7, "type": "request"}
2022-09-19 11:30:50,455 - DEBUG - Message received: {'type': 'event', 'event': 'process', 'body': {'startMethod': 'launch', 'name': '/home/tim/a.out', 'systemProcessId': 1979, 'pointerSize': 64}, 'seq': 12}
2022-09-19 11:30:50,455 - INFO - User Msg: The debuggee was started: /home/tim/a.out
2022-09-19 11:30:50,687 - DEBUG - Message received: {'type': 'event', 'event': 'thread', 'body': {'reason': 'started', 'threadId': 1979}, 'seq': 13}
2022-09-19 11:30:50,687 - DEBUG - Message received: {'type': 'event', 'event': 'breakpoint', 'body': {'reason': 'changed', 'breakpoint': {'id': 1, 'verified': True, 'line': 5, 'BoundBreakpoints': []}}, 'seq': 14}
2022-09-19 11:30:50,688 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': 'Stopped due to shared library event (no libraries added or removed)\n'}, 'seq': 15}
2022-09-19 11:30:50,688 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'console', 'output': "Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.\n"}, 'seq': 16}
2022-09-19 11:30:50,688 - DEBUG - Message received: {'type': 'event', 'event': 'module', 'body': {'reason': 'new', 'module': {'id': 1, 'name': 'ld-linux-x86-64.so.2', 'path': '/lib64/ld-linux-x86-64.so.2', 'symbolFilePath': '/lib64/ld-linux-x86-64.so.2', 'vsLoadAddress': '140737353896080', 'vsPreferredLoadAddress': '140737353896080', 'vsModuleSize': 168613, 'vsLoadOrder': 0, 'vsTimestampUTC': '1657149803', 'vsIs64Bit': True}}, 'seq': 17}
2022-09-19 11:30:50,918 - DEBUG - Message received: {'type': 'response', 'request_seq': 7, 'success': True, 'command': 'threads', 'body': {'threads': [{'id': 1979, 'name': 'a.out [1979]'}]}, 'seq': 18}
2022-09-19 11:30:50,919 - DEBUG - Sending Message: {"command": "threads", "seq": 8, "type": "request"}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': '[Thread debugging using libthread_db enabled]\n'}, 'seq': 19}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': 'Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".\n'}, 'seq': 20}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': '\n'}, 'seq': 21}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': 'Breakpoint 1, main () at ctest.cc:5\n'}, 'seq': 22}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'stdout', 'output': '5\t\treturn 0;\n'}, 'seq': 23}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'console', 'output': "Loaded '/lib/x86_64-linux-gnu/libstdc++.so.6'. Symbols loaded.\n"}, 'seq': 24}
2022-09-19 11:30:50,919 - DEBUG - Message received: {'type': 'event', 'event': 'module', 'body': {'reason': 'new', 'module': {'id': 2, 'name': 'libstdc++.so.6', 'path': '/lib/x86_64-linux-gnu/libstdc++.so.6', 'symbolFilePath': '/lib/x86_64-linux-gnu/libstdc++.so.6', 'vsLoadAddress': '140737352221824', 'vsPreferredLoadAddress': '140737352221824', 'vsModuleSize': 1082610, 'vsLoadOrder': 1, 'vsTimestampUTC': '1647686192', 'vsIs64Bit': True}}, 'seq': 25}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'console', 'output': "Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.\n"}, 'seq': 26}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'module', 'body': {'reason': 'new', 'module': {'id': 3, 'name': 'libc.so.6', 'path': '/lib/x86_64-linux-gnu/libc.so.6', 'symbolFilePath': '/lib/x86_64-linux-gnu/libc.so.6', 'vsLoadAddress': '140737349461760', 'vsPreferredLoadAddress': '140737349461760', 'vsModuleSize': 1647549, 'vsLoadOrder': 2, 'vsTimestampUTC': '1657149803', 'vsIs64Bit': True}}, 'seq': 27}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'console', 'output': "Loaded '/lib/x86_64-linux-gnu/libm.so.6'. Symbols loaded.\n"}, 'seq': 28}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'module', 'body': {'reason': 'new', 'module': {'id': 4, 'name': 'libm.so.6', 'path': '/lib/x86_64-linux-gnu/libm.so.6', 'symbolFilePath': '/lib/x86_64-linux-gnu/libm.so.6', 'vsLoadAddress': '140737348408224', 'vsPreferredLoadAddress': '140737348408224', 'vsModuleSize': 505160, 'vsLoadOrder': 3, 'vsTimestampUTC': '1657149803', 'vsIs64Bit': True}}, 'seq': 29}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'console', 'output': "Loaded '/lib/x86_64-linux-gnu/libgcc_s.so.1'. Symbols loaded.\n"}, 'seq': 30}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'module', 'body': {'reason': 'new', 'module': {'id': 5, 'name': 'libgcc_s.so.1', 'path': '/lib/x86_64-linux-gnu/libgcc_s.so.1', 'symbolFilePath': '/lib/x86_64-linux-gnu/libgcc_s.so.1', 'vsLoadAddress': '140737348232800', 'vsPreferredLoadAddress': '140737348232800', 'vsModuleSize': 91525, 'vsLoadOrder': 4, 'vsTimestampUTC': '1647686192', 'vsIs64Bit': True}}, 'seq': 31}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'output', 'body': {'category': 'console', 'output': 'Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)\n'}, 'seq': 32}
2022-09-19 11:30:50,920 - DEBUG - Message received: {'type': 'event', 'event': 'stopped', 'body': {'reason': 'breakpoint', 'threadId': 1979, 'allThreadsStopped': True, 'source': {'name': 'ctest.cc', 'path': '/home/tim/ctest.cc', 'sources': [], 'checksums': []}, 'line': 5, 'column': 1}, 'seq': 33}
2022-09-19 11:30:50,920 - WARNING - User Msg: Paused in thread 1979 due to breakpoint
2022-09-19 11:30:51,102 - DEBUG - Sending Message: {"command": "threads", "seq": 9, "type": "request"}
2022-09-19 11:30:51,312 - DEBUG - Message received: {'type': 'response', 'request_seq': 8, 'success': True, 'command': 'threads', 'body': {'threads': [{'id': 1979, 'name': 'a.out [1979]'}]}, 'seq': 34}
2022-09-19 11:30:51,312 - DEBUG - Message received: {'type': 'response', 'request_seq': 9, 'success': True, 'command': 'threads', 'body': {'threads': [{'id': 1979, 'name': 'a.out [1979]'}]}, 'seq': 35}
2022-09-19 11:30:51,312 - DEBUG - Sending Message: {"command": "stackTrace", "arguments": {"threadId": 1979}, "seq": 10, "type": "request"}
2022-09-19 11:30:51,537 - DEBUG - Message received: {'type': 'response', 'request_seq': 10, 'success': True, 'command': 'stackTrace', 'body': {'stackFrames': [{'id': 1000, 'name': 'main()', 'source': {'name': 'ctest.cc', 'path': '/home/tim/ctest.cc', 'sources': [], 'checksums': []}, 'line': 5, 'column': 1, 'instructionPointerReference': '0x0000555555555171'}], 'totalFrames': 1}, 'seq': 36}
2022-09-19 11:30:51,546 - DEBUG - Sending Message: {"command": "scopes", "arguments": {"frameId": 1000}, "seq": 11, "type": "request"}
2022-09-19 11:30:51,813 - DEBUG - Message received: {'type': 'response', 'request_seq': 11, 'success': True, 'command': 'scopes', 'body': {'scopes': [{'presentationHint': 'locals', 'name': 'Locals', 'variablesReference': 1000, 'expensive': False}, {'presentationHint': 'registers', 'name': 'Registers', 'variablesReference': 1001, 'expensive': True}]}, 'seq': 37}
2022-09-19 11:30:51,813 - DEBUG - Sending Message: {"command": "variables", "arguments": {"variablesReference": 1000}, "seq": 12, "type": "request"}
2022-09-19 11:30:52,025 - DEBUG - Message received: {'type': 'response', 'request_seq': 12, 'success': True, 'command': 'variables', 'body': {'variables': []}, 'seq': 38}

Vim version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 18 2022 19:26:30)
引入修正: 1-3995
修改者為team+vim@tracker.debian.org
編譯者:team+vim@tracker.debian.org
超強版本 不使用圖型界面。 目前可使用(+)與不可使用(-)的模組列表:
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     -perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          -ruby              +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      +sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        +mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary        
-farsi             -mouse_sysmouse    -tag_old_static    
        系統 vimrc 設定檔: "$VIM/vimrc"
  使用者個人 vimrc 設定檔: "$HOME/.vimrc"
    第二組個人 vimrc 檔案: "~/.vim/vimrc"
   使用者個人 exrc 設定檔: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
              $VIM 預設值: "/usr/share/vim"
編譯方式: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-8W0Acv/vim-8.2.3995=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
鏈結方式: gcc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lsodium -lacl -lattr -lgpm -L/usr/lib/python3.10/config-3.10-x86_64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm

Python version

3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]

Neovim diagnostics

*Not NeoVim*

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

timsu92 commented 2 years ago

I apologize for not translating Vim version info as I don't know the exact wordings in English.

puremourning commented 2 years ago

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.