microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.43k stars 429 forks source link

[regression] TypeError when running CTests with debugging #3817

Closed tristanlabelle closed 3 weeks ago

tristanlabelle commented 3 weeks ago

Brief Issue Summary

Running tests with debugging from the test explorer has recently regressed to failing with

TypeError: Cannot read properties of undefined (reading 'fsPath')"

image

I attached a debugger and found that this line assumes that TestItem.uri is non-null, whereas it is in our case.

image

I'm flagging this as a regression because it just recently started happening and affecting our engineers.

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.89.1",
  "cmtVersion": "1.18.41",
  "configurations": [
    {
      "folder": "c:\\Code\\<snip>",
      "cmakeVersion": "3.29.3",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": true,
      "compilers": {
        "C": "clang",
        "CXX": "clang"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 303,
    "executablesCount": 8,
    "librariesCount": 265,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "always",
      "configureOnOpen": true
    }
  ]
}

Debug Log

This is unrelated to the CMake build, but a problem of the CTest integration.

Additional Information

No response

gcampbell-msft commented 3 weeks ago

@tristanlabelle Could you try out this PR? #3814 I've updated it to include a catch fix for this.

tristanlabelle commented 3 weeks ago

@gcampbell-msft , yup, that fixes it!

gcampbell-msft commented 3 weeks ago

@tristanlabelle This issue will be fixed in pre-release tomorrow! We also plan to release a patch official release next week.