microsoft / microsoft/vscode-cpptools
Have trouble when Run VS Code outside the Developer Command Prompt
オープン
まだ誰も着手していません。
bug
tasks/build/debug
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
I have set up tasks.json but still can't run VS Code outside the Developer Command Prompt. My tasks.json like this:
{
"windows": {
"options": {
"shell": {
"executable": "cmd.exe",
"args": [
"/C",
// The path to VsDevCmd.bat depends on the version of Visual Studio you have installed.
"\"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/VsDevCmd.bat\"",
"&&"
]
}
}
},
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: cl.exe 生成活动文件",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/nologo",
"/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}
when I run code, it still prompt me that I need Developer Command Prompt

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された tasks.json 構成を Developer Command Prompt の外部で再現し、結果を表示されたエラーと比較します。VS Code のタスクが cl.exe と VsDevCmd.bat をどのように呼び出すかを追跡します。Developer Command Prompt の外部で起動した VS Code から、構成された C/C++ ビルドタスクが正常に実行されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, vscode
- 領域
- build-system, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100