astrskginoの日記

作業メモ的に雑に書いていきます。

"terminal.integrated.shell.windows" の非推奨(deprecated)によるコンパイル不能について

(作業環境:ターミナル:WSL, 言語:C++

数が月ぶりに vscode で遊ぼうと思ったところ、Total Problem に次のメッセージが表示された。

 

This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in `#terminal.integrated.profiles.windows#` and setting its profile name as the default in `#terminal.integrated.defaultProfile.windows#`. This will currently take priority over the new profiles settings but that will change in the future.

 

sprout2000 様の記事によると、2021/4 のアップデートによるもののようだ。

非推奨の "terminal.integrated.shell.windows" を推奨のものにに書き直す必要がある。

【VSCode】 "terminal.integrated.shell" is deprecated.【小ネタ】

 

Visual Studio Code April 2021

 

そこで、次のように修正した。

↓修正前

"terminal.integrated.shell.windows""C:\\Windows\\System32\\wsl.exe",

↓修正後

    //(ここから) 20210703 変更(Apr2021のアップデート対応)
    // (削除)"terminal.integrated.shell.windows": "C:\\Windows\\System32\\wsl.exe",
    "terminal.integrated.profiles.windows": {
      "Ubuntu-20.04 (WSL)": {
        "path""C:\\Windows\\System32\\wsl.exe",
        "args": [
          "-d",
          "Ubuntu-20.04"
        ]
      }
    },
    "terminal.integrated.defaultProfile.windows""Ubuntu-20.04 (WSL)",
    // (ここまで)20210703 変更(Apr2021のアップデート対応)

 

 

 以上。

 

作業終了後、コンパイラパスが GUI で編集したものと c_cpp_properties.jonson で編集したものとで内容が書き変わってしまう症状がでた。

 

#include エラーが検出されました。includePath を更新してください。

 

というエラーが出ている。後日対処予定。