microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

Windows 7: The language server crashed 5 times in the last 3 minutes. It will not be restarted. #12594

Closed ImJoyed closed 2 months ago

ImJoyed commented 2 months ago

Environment

Bug Summary and Steps to Reproduce

Bug Summary: I found this VSCode version is the last version, that support Win7. And I know is so old, so I try some old C/C++ extension versions, but don't work. When I open a qt cmake project, i have do nothing, I got that error: The language server crashed 5 times in the last 3 minutes. It will not be restarted.

Steps to reproduce: Only open a qt cmake project, the OS and VSCode are installed recent, no other operation.

Expected behavior: I wang develope a qt cmake project on Win7.

Configuration and Logs

loggingLevel: Debug
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
已启用自动完成。
如果已解决所有标头依赖项,则启用错误波形曲线。
悬停已启用。
IntelliSense 引擎 = default。
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
正在使用命令行查询默认 C++ 语言标准的编译器: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -x c++ -E -dM nul
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c17 -m64 -Wp,-v -E -dM -x c nul
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=gnu++14 -m64 -Wp,-v -E -dM -x c++ nul
已注册自定义配置提供程序“CMake Tools”
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
LSP: Sending response (id: 2)
LSP: (received) cpptools/queryCompilerDefaults (id: 3)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 3)
LSP: Sending response (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 4)
LSP: (invoked) cpptools/didChangeCppProperties (id: 4)
LSP: (received) cpptools/didChangeCppProperties (id: 5)
LSP: (received - deferred) cpptools/pauseParsing
LSP: (received - deferred) cpptools/clearCustomConfigurations
Warning: Database safety check failed. Recreating database.
[rc=0x80004005] (DB: false, Expected: true)
已初始化代码浏览服务
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
LSP: (queued) cpptools/pauseParsing
LSP: (queued) cpptools/clearCustomConfigurations
LSP: Sending response (id: 4)
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
LSP: (invoked) cpptools/didChangeCppProperties (id: 5)
正在发现文件...
LSP: Sending response (id: 5)
LSP: (invoked) cpptools/pauseParsing
LSP: (invoked) cpptools/clearCustomConfigurations
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\
  正在处理文件夹(递归): C:\USERS\MODEL\DOCUMENTS\HELLO\
  正在发现文件: 已处理 2478 个文件
  已从数据库中删除 0 个文件
“发现文件”操作已完成。
正在填充包含完成缓存。
正在分析剩余的文件...
LSP: (received) cpptools/queryCompilerDefaults (id: 6)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 6)
LSP: Sending response (id: 6)
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在使用命令行查询默认 C++ 语言标准的编译器: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -x c++ -E -dM nul
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/clearCustomConfigurations
LSP: (received) cpptools/resumeParsing
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -std=c++17 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\ 将编入索引
正在终止根位置的标记分析
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在发现文件...
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/resumeParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\
  正在处理文件夹(递归): C:\USERS\MODEL\DOCUMENTS\HELLO\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\
  正在发现文件: 已处理 8915 个文件
  已从数据库中删除 0 个文件
“发现文件”操作已完成。
正在填充包含完成缓存。
正在分析剩余的文件...
标记分析文件: C:\Users\Model\Documents\Hello\build\Hello_autogen\mocs_compilation.cpp
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
已启用自动完成。
如果已解决所有标头依赖项,则启用错误波形曲线。
悬停已启用。
IntelliSense 引擎 = default。
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
正在使用命令行查询默认 C++ 语言标准的编译器: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -x c++ -E -dM nul
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c17 -m64 -Wp,-v -E -dM -x c nul
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=gnu++14 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
LSP: Sending response (id: 2)
LSP: (received) cpptools/didChangeCppProperties (id: 3)
LSP: (invoked) cpptools/didChangeCppProperties (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 4)
LSP: (received - deferred) cpptools/pauseParsing
Warning: Database safety check failed. Recreating database.
[rc=0x80004005] (DB: false, Expected: true)
已初始化代码浏览服务
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
LSP: (queued) cpptools/pauseParsing
LSP: Sending response (id: 3)
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
LSP: (invoked) cpptools/didChangeCppProperties (id: 4)
正在发现文件...
LSP: Sending response (id: 4)
LSP: (invoked) cpptools/pauseParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在使用命令行查询默认 C++ 语言标准的编译器: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -x c++ -E -dM nul
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/clearCustomConfigurations
LSP: (received) cpptools/resumeParsing
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -std=c++17 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\ 将编入索引
已中止文件发现
  正在发现文件: 已处理 629 个文件
“发现文件”操作已完成。
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在发现文件...
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/resumeParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\
  正在处理文件夹(递归): C:\USERS\MODEL\DOCUMENTS\HELLO\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\
  正在发现文件: 已处理 8915 个文件
  已从数据库中删除 0 个文件
“发现文件”操作已完成。
正在填充包含完成缓存。
正在分析剩余的文件...
标记分析文件: C:\Users\Model\Documents\Hello\build\Hello_autogen\mocs_compilation.cpp
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
已启用自动完成。
如果已解决所有标头依赖项,则启用错误波形曲线。
悬停已启用。
IntelliSense 引擎 = default。
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
正在使用命令行查询默认 C++ 语言标准的编译器: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -x c++ -E -dM nul
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c17 -m64 -Wp,-v -E -dM -x c nul
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=gnu++14 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
LSP: Sending response (id: 2)
LSP: (received) cpptools/didChangeCppProperties (id: 3)
LSP: (invoked) cpptools/didChangeCppProperties (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 4)
LSP: (received - deferred) cpptools/pauseParsing
Warning: Database safety check failed. Recreating database.
[rc=0x80004005] (DB: false, Expected: true)
已初始化代码浏览服务
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
LSP: (queued) cpptools/pauseParsing
LSP: Sending response (id: 3)
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
LSP: (invoked) cpptools/didChangeCppProperties (id: 4)
LSP: Sending response (id: 4)
LSP: (invoked) cpptools/pauseParsing
正在发现文件...
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在使用命令行查询默认 C++ 语言标准的编译器: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -x c++ -E -dM nul
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/clearCustomConfigurations
LSP: (received) cpptools/resumeParsing
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -std=c++17 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\ 将编入索引
已中止文件发现
  正在发现文件: 已处理 665 个文件
“发现文件”操作已完成。
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在发现文件...
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/resumeParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\
  正在处理文件夹(递归): C:\USERS\MODEL\DOCUMENTS\HELLO\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\
  正在发现文件: 已处理 8915 个文件
  已从数据库中删除 0 个文件
“发现文件”操作已完成。
正在填充包含完成缓存。
正在分析剩余的文件...
标记分析文件: C:\Users\Model\Documents\Hello\build\Hello_autogen\mocs_compilation.cpp
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
已启用自动完成。
如果已解决所有标头依赖项,则启用错误波形曲线。
悬停已启用。
IntelliSense 引擎 = default。
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
正在使用命令行查询默认 C++ 语言标准的编译器: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -x c++ -E -dM nul
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c17 -m64 -Wp,-v -E -dM -x c nul
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=gnu++14 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
LSP: Sending response (id: 2)
LSP: (received) cpptools/didChangeCppProperties (id: 3)
LSP: (invoked) cpptools/didChangeCppProperties (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 4)
LSP: (received - deferred) cpptools/pauseParsing
Warning: Database safety check failed. Recreating database.
[rc=0x80004005] (DB: false, Expected: true)
已初始化代码浏览服务
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
LSP: (queued) cpptools/pauseParsing
LSP: Sending response (id: 3)
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
LSP: (invoked) cpptools/didChangeCppProperties (id: 4)
LSP: Sending response (id: 4)
正在发现文件...
LSP: (invoked) cpptools/pauseParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在使用命令行查询默认 C++ 语言标准的编译器: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -x c++ -E -dM nul
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/clearCustomConfigurations
LSP: (received) cpptools/resumeParsing
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -std=c++17 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\ 将编入索引
已中止文件发现
  正在发现文件: 已处理 649 个文件
“发现文件”操作已完成。
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在发现文件...
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/resumeParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\
  正在处理文件夹(递归): C:\USERS\MODEL\DOCUMENTS\HELLO\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\
  正在发现文件: 已处理 8915 个文件
  已从数据库中删除 0 个文件
“发现文件”操作已完成。
正在填充包含完成缓存。
正在分析剩余的文件...
标记分析文件: C:\Users\Model\Documents\Hello\build\Hello_autogen\mocs_compilation.cpp
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.21.6
cpptools version (native): 1.21.6.0
已启用自动完成。
如果已解决所有标头依赖项,则启用错误波形曲线。
悬停已启用。
IntelliSense 引擎 = default。
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
正在使用命令行查询默认 C++ 语言标准的编译器: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -x c++ -E -dM nul
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c17 -m64 -Wp,-v -E -dM -x c nul
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=gnu++14 -m64 -Wp,-v -E -dM -x c++ nul
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
LSP: Sending response (id: 2)
LSP: (received) cpptools/didChangeCppProperties (id: 3)
LSP: (invoked) cpptools/didChangeCppProperties (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 4)
LSP: (received - deferred) cpptools/pauseParsing
Warning: Database safety check failed. Recreating database.
[rc=0x80004005] (DB: false, Expected: true)
已初始化代码浏览服务
编译器查询命令行: C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe -std=c11 -m64 -Wp,-v -E -dM -x c nul
正在尝试从 "compilerPath" 属性中的 C 编译器获取默认值:“C:\Qt\Qt5.14.2\Tools\mingw730_64\bin\gcc.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
LSP: (queued) cpptools/pauseParsing
LSP: Sending response (id: 3)
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
已收到自定义浏览配置: {
  "browsePath": [
    "c:/users/model/documents/hello/build",
    "c:/users/model/documents/hello",
    "c:/users/model/documents/hello/build/hello_autogen/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtwidgets",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtgui",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtangle",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/include/qtcore",
    "c:/qt/qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++",
    "c:/users/model/documents/hello/build/hello_autogen",
    "c:/users/model/documents/hello/build/cmakefiles"
  ],
  "compilerPath": "c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe",
  "compilerArgs": [],
  "compilerFragments": []
}
LSP: (invoked) cpptools/didChangeCppProperties (id: 4)
正在发现文件...
LSP: Sending response (id: 4)
LSP: (invoked) cpptools/pauseParsing
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在使用命令行查询默认 C++ 语言标准的编译器: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -x c++ -E -dM nul
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/clearCustomConfigurations
LSP: (received) cpptools/resumeParsing
检测到的语言标准版本: gnu++14
正在使用命令行查询编译器的目标:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”-dumpmachine
编译器返回的默认目标值: x86_64-w64-mingw32
编译器查询命令行: c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe -std=c++17 -m64 -Wp,-v -E -dM -x c++ nul
LSP: (received) cpptools/didChangeVisibleTextEditors
正在尝试从 "compilerPath" 属性中的 C++ 编译器获取默认值:“c:/qt/qt5.14.2/tools/mingw730_64/bin/g++.exe”
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\ 将编入索引
  文件夹 C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\ 将编入索引
  文件夹 C:\USERS\MODEL\DOCUMENTS\HELLO\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\ 将编入索引
  文件夹 C:\QT\QT5.14.2\5.14.2\MINGW73_64\MKSPECS\WIN32-G++\ 将编入索引
已中止文件发现
  正在发现文件: 已处理 707 个文件
“发现文件”操作已完成。
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
正在发现文件...
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/resumeParsing
LSP: (invoked) cpptools/didChangeVisibleTextEditors
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\LIB\GCC\X86_64-W64-MINGW32\7.3.0\INCLUDE-FIXED\
  正在处理文件夹(递归): C:\QT\QT5.14.2\TOOLS\MINGW730_64\X86_64-W64-MINGW32\INCLUDE\
  正在处理文件夹(递归): C:\USERS\MODEL\DOCUMENTS\HELLO\
  正在处理文件夹(递归): C:\QT\QT5.14.2\5.14.2\MINGW73_64\INCLUDE\

Other Extensions

Additional context

No response

sean-mcmanus commented 2 months ago

@ImJoyed It looks like a crash tag parsing C:\Users\Model\Documents\Hello\build\Hello_autogen\mocs_compilation.cpp . Does adding

"C_Cpp.files.exclude": [
"**/Hello_autogen": "true"
]

fix the issue?

If you open a different folder that doesn't contain that file, does it still crash?

Can you comment out the code in that function, attach a debugger to the cpptools.exe process and then uncomment the code to get a crash call stack?

ImJoyed commented 2 months ago

@ImJoyed It looks like a crash tag parsing C:\Users\Model\Documents\Hello\build\Hello_autogen\mocs_compilation.cpp . Does adding

"C_Cpp.files.exclude": [
"**/Hello_autogen": "true"
]

fix the issue?

If you open a different folder that doesn't contain that file, does it still crash?

Can you comment out the code in that function, attach a debugger to the cpptools.exe process and then uncomment the code to get a crash call stack?

I added Hello_autogen in exclude files, but the issue still occurred. I only opened a hello.cpp file, and the issue still occurred.

sean-mcmanus commented 2 months ago

@ImJoyed It might be some problem loading an OS dll that is needed for tag parsing (i.e. some DLL dependency that is missing from your Win7 SP1 installation). Can you get a repro that doesn't repro the crash (no tag parsing messages are logged), such as an empty workspace folder with a c_cpp_properties.json that has "compilerPath": "", then attach a debugger to cpptools.exe (see https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv) and then add a source file to get it to tag parse it and then crash and provide the crash call stack? That would help us diagnose the cause.

You may need to install the Visual C++ Redistributable package or the .NET Framework (SDK), see a previous issue https://github.com/microsoft/vscode-cpptools/issues/2878 , if the issue is missing/expected DLLs (the crash call stack might show it's trying to load a library).

ImJoyed commented 2 months ago

I followed the instructions from this link: https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv, but when debugging, it immediately ends after attaching, and I can't get any useful information.

You can see that the debug toolbar only appears for a moment and then disappears.

https://github.com/user-attachments/assets/6a3e4a69-33ff-495d-85fe-d5ec238ec4df

ImJoyed commented 2 months ago

@sean-mcmanus

I installed the same version of VSCode and the C/C++ Extension on a Windows 10 system, and they work fine. However, my internal network environment only supports Windows 7. Does the plugin have any dependencies, such as C++ runtime or .NET, that might affect its functionality?

My VSCode on Win7 cannot attach to the process for debugging, so I switched to using WinDbg for debugging and got the following information. It looks like there is an issue when calling the RtlUserThreadStart function from the ntdll library.

PID 2816

Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: C:\Symbols
Executable search path is: 
ModLoad: 00000001`3ff60000 00000001`41452000   cpptools.exe
ModLoad: 00000000`77c10000 00000000`77db9000   ntdll.dll
ModLoad: 00000000`779f0000 00000000`77b0f000   C:\Windows\system32\kernel32.dll
ModLoad: 000007fe`fdc50000 000007fe`fdcbb000   C:\Windows\system32\KERNELBASE.dll
ModLoad: 000007fe`fea20000 000007fe`fea6d000   C:\Windows\system32\WS2_32.dll
ModLoad: 000007fe`fe980000 000007fe`fea1f000   C:\Windows\system32\msvcrt.dll
ModLoad: 000007fe`ffb10000 000007fe`ffc3d000   C:\Windows\system32\RPCRT4.dll
ModLoad: 000007fe`ffad0000 000007fe`ffad8000   C:\Windows\system32\NSI.dll
ModLoad: 000007fe`fcea0000 000007fe`fcebe000   C:\Windows\system32\USERENV.dll
ModLoad: 000007fe`fdb60000 000007fe`fdb6f000   C:\Windows\system32\profapi.dll
ModLoad: 00000000`77b10000 00000000`77c0a000   C:\Windows\system32\USER32.dll
ModLoad: 000007fe`fecd0000 000007fe`fed37000   C:\Windows\system32\GDI32.dll
ModLoad: 000007fe`fe3a0000 000007fe`fe3ae000   C:\Windows\system32\LPK.dll
ModLoad: 000007fe`fdf30000 000007fe`fdff9000   C:\Windows\system32\USP10.dll
ModLoad: 000007fe`fed40000 000007fe`ffac8000   C:\Windows\system32\SHELL32.dll
ModLoad: 000007fe`ffea0000 000007fe`fff11000   C:\Windows\system32\SHLWAPI.dll
ModLoad: 000007fe`fe4c0000 000007fe`fe6c3000   C:\Windows\system32\ole32.dll
ModLoad: 000007fe`fe2c0000 000007fe`fe397000   C:\Windows\system32\OLEAUT32.dll
ModLoad: 000007fe`fe8a0000 000007fe`fe97b000   C:\Windows\system32\ADVAPI32.dll
ModLoad: 000007fe`fe2a0000 000007fe`fe2bf000   C:\Windows\SYSTEM32\sechost.dll
ModLoad: 000007fe`f0350000 000007fe`f03bf000   C:\Windows\system32\mscoree.dll
(b00.814): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00000000`77cbcb60 cc              int     3
0:001> gh
ModLoad: 000007fe`ffae0000 000007fe`ffb0e000   C:\Windows\system32\IMM32.DLL
ModLoad: 000007fe`fe3b0000 000007fe`fe4b9000   C:\Windows\system32\MSCTF.dll
ntdll!RtlUserThreadStart:
00000000`77c3c500 4883ec48        sub     rsp,48h
0:000> gh
       ^ No runnable debuggees error in 'gh'

PID 1900

Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: C:\Symbols
Executable search path is: 
ModLoad: 00000001`3ff60000 00000001`41452000   c:\Users\Model\.vscode\extensions\ms-vscode.cpptools-1.21.6\bin\cpptools.exe
ModLoad: 00000000`77c10000 00000000`77db9000   C:\Windows\SYSTEM32\ntdll.dll
ModLoad: 00000000`779f0000 00000000`77b0f000   C:\Windows\system32\kernel32.dll
ModLoad: 000007fe`fdc50000 000007fe`fdcbb000   C:\Windows\system32\KERNELBASE.dll
ModLoad: 000007fe`fea20000 000007fe`fea6d000   C:\Windows\system32\WS2_32.dll
ModLoad: 000007fe`fe980000 000007fe`fea1f000   C:\Windows\system32\msvcrt.dll
ModLoad: 000007fe`ffb10000 000007fe`ffc3d000   C:\Windows\system32\RPCRT4.dll
ModLoad: 000007fe`ffad0000 000007fe`ffad8000   C:\Windows\system32\NSI.dll
ModLoad: 000007fe`fcea0000 000007fe`fcebe000   C:\Windows\system32\USERENV.dll
ModLoad: 000007fe`fdb60000 000007fe`fdb6f000   C:\Windows\system32\profapi.dll
ModLoad: 00000000`77b10000 00000000`77c0a000   C:\Windows\system32\USER32.dll
ModLoad: 000007fe`fecd0000 000007fe`fed37000   C:\Windows\system32\GDI32.dll
ModLoad: 000007fe`fe3a0000 000007fe`fe3ae000   C:\Windows\system32\LPK.dll
ModLoad: 000007fe`fdf30000 000007fe`fdff9000   C:\Windows\system32\USP10.dll
ModLoad: 000007fe`fed40000 000007fe`ffac8000   C:\Windows\system32\SHELL32.dll
ModLoad: 000007fe`ffea0000 000007fe`fff11000   C:\Windows\system32\SHLWAPI.dll
ModLoad: 000007fe`fe4c0000 000007fe`fe6c3000   C:\Windows\system32\ole32.dll
ModLoad: 000007fe`fe2c0000 000007fe`fe397000   C:\Windows\system32\OLEAUT32.dll
ModLoad: 000007fe`fe8a0000 000007fe`fe97b000   C:\Windows\system32\ADVAPI32.dll
ModLoad: 000007fe`fe2a0000 000007fe`fe2bf000   C:\Windows\SYSTEM32\sechost.dll
ModLoad: 000007fe`f0350000 000007fe`f03bf000   C:\Windows\system32\mscoree.dll
ModLoad: 000007fe`ffae0000 000007fe`ffb0e000   C:\Windows\system32\IMM32.DLL
ModLoad: 000007fe`fe3b0000 000007fe`fe4b9000   C:\Windows\system32\MSCTF.dll
ModLoad: 000007fe`fc240000 000007fe`fc296000   C:\Windows\system32\uxtheme.dll
ModLoad: 000007fe`fd390000 000007fe`fd3e5000   C:\Windows\system32\mswsock.dll
ModLoad: 000007fe`fcd90000 000007fe`fcd97000   C:\Windows\System32\wshtcpip.dll
ModLoad: 000007fe`fd380000 000007fe`fd387000   C:\Windows\System32\wship6.dll
ModLoad: 000007fe`fd9f0000 000007fe`fda47000   C:\Windows\system32\apphelp.dll
(76c.dac): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`77c60530 cc              int     3
0:015> gh
ntdll!RtlUserThreadStart:
00000000`77c3c500 4883ec48        sub     rsp,48h
0:004> gh
       ^ No runnable debuggees error in 'gh'
ImJoyed commented 2 months ago

I resolved the issue.

After installing the KB2533623 update and the DotNet 4.6.1 runtime, the crash no longer occurs. But I don't know which one was effective, perhaps both worked simultaneously.

I couldn't debug cpptools using Attach, and then I noticed that the json specified cppvsdbg. So, I tried installing Visual Studio 2019, but installing this version on Windows 7 requires the KB2533623 update and the DotNet 4.6.1 runtime. After completing the installation, cpptools stopped encountering exceptions.