Bug 244180

Summary: editors/vscode: C/C++ projects fail to build: Unhandled exception: Unhandled Promise rejection: Update code model for cpptools: Non-functional IntelliSense
Product: Ports & Packages Reporter: bourne.identity <bourne.identity>
Component: Individual Port(s)Assignee: Hiroki Tagato <tagattie>
Status: Open ---    
Severity: Affects Some People CC: lwhsu, tagattie
Priority: --- Keywords: needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (tagattie)
Hardware: Any   
OS: Any   

Description bourne.identity@hotmail.com 2020-02-17 03:17:39 UTC
On FreeBSD 12.1 amd64, I am trying to build a single-file C++ project in 
VSCode using cmake. My VSCode has 3 extensions installed:

1) C/C++
2) CMake
3) CMake Tools

My CMakeLists.txt is as under:

cmake_minimum_required (VERSION 3.0)

set(SOURCE chkascii.cc)
add_executable(${PROJECT_NAME} ${SOURCE})

Running cmake::configure in the VSCode command palette gives me:

[rollbar] Unhandled exception: Unhandled Promise rejection: Update code 
model for cpptools TypeError: Cannot read property 'getApi' of undefined {}

Further, IntelliSense does not work in my VSCode C++ project under FreeBSD.

Everything works fine when I use and build the project under Linux.
Comment 1 Hiroki Tagato 2020-02-17 11:41:41 UTC
(In reply to bourne.identity@hotmail.com from comment #0)

The Microsoft's C/C++ extension appears to depend on some platform-specific binaries (downloaded after extension installation). So it would not work out of the box.

The notes at:


describes how to make it work with FreeBSD's linux compatibility layer. However, it is quite old and I don't know if it can be applied to the current version of C/C++ extension.
Comment 2 Li-Wen Hsu freebsd_committer 2020-06-16 22:45:26 UTC
Over to maintainer.