Skip to content

Enable setting the VS dev environment without running from Dev Command Prompt #13571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
622d67b
WIP - migrate devcmd to cpptools
bobbrow Apr 26, 2025
12f31c1
Update walkthrough and make runAndDebug work
bobbrow Apr 30, 2025
afbecf9
localize
bobbrow Apr 30, 2025
aefe4cc
rename variable
bobbrow Apr 30, 2025
ff1a8fe
Reset translations for string without args to fix gulp task
bobbrow Apr 30, 2025
af6374d
delete the strings instead
bobbrow Apr 30, 2025
cf58757
add telemetry
bobbrow Apr 30, 2025
a6dde1b
add a test for Windows
bobbrow Apr 30, 2025
8075e84
test for linux/mac
bobbrow Apr 30, 2025
facd749
Additional walkthrough tuning
bobbrow Apr 30, 2025
76c577e
Merge branch 'bobbrow/devEnvironment' of https://github.com/microsoft…
bobbrow Apr 30, 2025
f2b66ad
fix the setting scope
bobbrow Apr 30, 2025
6c97412
telemetry for build and debug
bobbrow Apr 30, 2025
540537a
cleanup in devcmd.ts
bobbrow Apr 30, 2025
bf9bb26
one more update to the walkthrough text
bobbrow Apr 30, 2025
80c9d8e
PR feedback
bobbrow May 1, 2025
6c43354
Merge branch 'main' into bobbrow/devEnvironment
sean-mcmanus May 5, 2025
5281786
Address PR feedback
bobbrow May 5, 2025
5c03666
Merge branch 'bobbrow/devEnvironment' of https://github.com/microsoft…
bobbrow May 5, 2025
9013124
rename telemetry property
bobbrow May 6, 2025
98f430e
PR feedback
bobbrow May 6, 2025
b68f025
consistency in commands and user-visible text
bobbrow May 6, 2025
a79eef9
fix environment overriding and some string capitalization
bobbrow May 7, 2025
614795b
update the settings wrapper
bobbrow May 7, 2025
4482734
update locked string
bobbrow May 7, 2025
bebdaeb
PR feedback
bobbrow May 7, 2025
14ffb78
handle outdated vs environment
bobbrow May 8, 2025
d8f7b19
Merge branch 'main' into bobbrow/devEnvironment
bobbrow May 8, 2025
63be00c
PR feedback
bobbrow May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "使用 {0} 重新启动",
"walkthrough.windows.background.dev.command.prompt": " 你使用的是具有 MSVC 编译器的 Windows 计算机,因此需要从 {0} 启动 VS Code,以正确设置所有环境变量。要使用 {1} 重新启动,请:",
"walkthrough.open.command.prompt": "通过在 Windows“开始”菜单中键入“{1}”打开 {0}。选择 {2} 将自动导航到当前打开的文件夹。",
"walkthrough.windows.press.f5": "在命令提示符中键入“{0}”,然后按 Enter。此操作应会重新启动 VS Code 并将你带回此演练。"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "使用 {0} 重新啟動",
"walkthrough.windows.background.dev.command.prompt": " 您正使用 Windows 電腦搭配 MSVC 編譯器,因此您必須從 {0} 啟動 VS Code,以便正確設定所有環境變數。若要使用 {1} 以下重新啟動:",
"walkthrough.open.command.prompt": "在 Windows [開始] 功能表中輸入 \"{1}\",以開啟 {0}。選取 {2},這會自動瀏覽至您目前開啟的資料夾。",
"walkthrough.windows.press.f5": "在命令提示字元中輸入 \"{0}\",然後按 Enter。這應該會重新啟動 VS Code,並帶您回到此逐步解說。"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Znovu spustit pomocí {0}",
"walkthrough.windows.background.dev.command.prompt": " Používáte počítač s Windows s kompilátorem MVSC, takže musíte spustit VS Code z {0}, aby se všechny proměnné prostředí správně nastavily. Opětovné spuštění pomocí nástroje {1}:",
"walkthrough.open.command.prompt": "Otevřete {0} zadáním „{1}“ v nabídce Start ve Windows. Vyberte {2}, čímž automaticky přejdete do aktuální otevřené složky.",
"walkthrough.windows.press.f5": "Do příkazového řádku zadejte „{0}“ a stiskněte Enter. Mělo by se znovu spustit VS Code a vrátit se k tomuto názorném postupu. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Mit dem {0} neu starten",
"walkthrough.windows.background.dev.command.prompt": " Sie verwenden einen Windows-Computer mit dem MSVC-Compiler. Daher müssen Sie VS Code aus dem {0} starten, damit alle Umgebungsvariablen ordnungsgemäß festgelegt werden. So initiieren Sie den Neustart mithilfe von {1}:",
"walkthrough.open.command.prompt": "Öffnen Sie die {0}, indem Sie im Windows-Startmenü „{1}“ eingeben. Wählen Sie {2} aus, das Sie automatisch zu Ihrem aktuell geöffneten Ordner navigiert.",
"walkthrough.windows.press.f5": "Geben Sie „{0}“ in die Eingabeaufforderung ein, und drücken Sie die EINGABETASTE. Dies sollte VS Code neu starten und Sie zu dieser exemplarischen Vorgehensweise zurückkehren. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Volver a iniciar con el {0}",
"walkthrough.windows.background.dev.command.prompt": " Está usando una máquina Windows con el compilador de MSVC, por lo que debe iniciar VS Code desde el {0} para que todas las variables de entorno se establezcan correctamente. Para volver a iniciar con el {1}:",
"walkthrough.open.command.prompt": "Abra {0} escribiendo '{1}' en el menú Inicio de Windows. Selecciona el {2}, que irá automáticamente a la carpeta abierta actual.",
"walkthrough.windows.press.f5": "Escriba '{0}' en el símbolo del sistema y pulse Entrar. Esto debería reiniciar VS Code y hacerte volver a este tutorial. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Relancer à l’aide du {0}",
"walkthrough.windows.background.dev.command.prompt": " Vous utilisez une machine Windows avec le compilateur MSVC. Vous devez donc démarrer VS Code à partir de l’{0} pour que toutes les variables d’environnement soient correctement définies. Pour relancer en tirant parti de l’{1} :",
"walkthrough.open.command.prompt": "Ouvrez le {0} en tapant « {1} » dans le menu Démarrer de Windows. Sélectionnez le {2}, qui accède automatiquement à votre dossier ouvert actuel.",
"walkthrough.windows.press.f5": "Tapez « {0} » dans l’invite de commandes et appuyez sur Entrée. Vous devriez relancer VS Code et revenir à cette procédure pas à pas. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Riavvia utilizzando il {0}",
"walkthrough.windows.background.dev.command.prompt": " Si sta usando un computer Windows con il compilatore MSVC, quindi è necessario avviare VS Code da {0} per impostare correttamente tutte le variabili di ambiente. Per riavviare usando {1}:",
"walkthrough.open.command.prompt": "Aprire il {0} digitando \"{1}\" nel menu Start di Windows. Selezionare il {2}, che passerà automaticamente alla cartella aperta corrente.",
"walkthrough.windows.press.f5": "Digitare \"{0}\" nel prompt dei comandi e premere INVIO. È consigliabile riavviare VS Code e tornare a questa procedura dettagliata. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "{0} を使用して再起動する",
"walkthrough.windows.background.dev.command.prompt": " MSVC コンパイラで Windows マシンを使用しているため、すべての環境変数を正しく設定するには、{0} から VS Code を開始する必要があります。{1} を使用して再起動するには:",
"walkthrough.open.command.prompt": "Windows スタート メニューで \"{1}\" と入力して、{0} を開きます。{2} を選択すると、現在開いているフォルダーに自動的に移動します。",
"walkthrough.windows.press.f5": "コマンド プロンプトに \"{0}\" と入力して Enter キーを押します。これにより、VS Code が再起動され、このチュートリアルに戻ります。"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "{0}을(를) 사용하여 다시 시작",
"walkthrough.windows.background.dev.command.prompt": " MSVC 컴파일러와 함께 Windows 컴퓨터를 사용하고 있으므로 모든 환경 변수를 올바르게 설정하려면 {0}에서 VS Code를 시작해야 합니다. {1}을(를) 사용하여 다시 시작하려면 다음을 수행하세요.",
"walkthrough.open.command.prompt": "Windows 시작 메뉴에 \"{1}\"을(를) 입력하여 {0}을(를) 엽니다. {2}을(를) 선택하면 현재 열려 있는 폴더로 자동으로 이동합니다.",
"walkthrough.windows.press.f5": "명령 프롬프트에 \"{0}\"을(를) 입력하고 Enter 키를 누릅니다. 이렇게 하면 VS Code가 다시 시작되고 이 연습으로 다시 돌아옵니다. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Uruchom ponownie przy użyciu {0}",
"walkthrough.windows.background.dev.command.prompt": " Używasz komputera z systemem Windows i kompilatorem programu Microsoft Visual C++ z {0}, więc musisz uruchomić program VS Code od początku, aby wszystkie zmienne środowiskowe zostały poprawnie ustawione. Aby ponownie uruchomić przy użyciu {1}:",
"walkthrough.open.command.prompt": "Otwórz pozycję {0}, wpisując „{1}” w menu Start systemu Windows. Wybierz {2}, który automatycznie przeniesie do bieżącego otwartego folderu.",
"walkthrough.windows.press.f5": "Wpisz „{0}” w wierszu polecenia i naciśnij klawisz Enter. To powinno ponownie uruchomić program VS Code i przenieść Cię z powrotem do tego przewodnika. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Reiniciar usando o {0}",
"walkthrough.windows.background.dev.command.prompt": " Você está usando um computador Windows com o compilador do MSVC, portanto, é necessário iniciar o VS Code a partir do {0} para que todas as variáveis de ambiente sejam definidas corretamente. Para reiniciar usando o {1}:",
"walkthrough.open.command.prompt": "Abra o {0} digitando \"{1}\" no menu Iniciar do Windows. Selecione o {2}, que navegará automaticamente para a pasta atualmente aberta.",
"walkthrough.windows.press.f5": "Digite \"{0}\" na solicitação de comando e pressione enter. Isso deve relançar o VS Code e levá-lo de volta a este tutorial. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Перезапустить с помощью {0}",
"walkthrough.windows.background.dev.command.prompt": " Вы используете компьютер Windows с компилятором MSVC, поэтому вам необходимо запустить VS Code из {0}, чтобы все переменные среды были установлены правильно. Для перезапуска с помощью {1}:",
"walkthrough.open.command.prompt": "Откройте {0}, введя \"{1}\" в меню \"Пуск\" в Windows. Выберите {2}. Вы автоматически перейдете к текущей открытой папке.",
"walkthrough.windows.press.f5": "Введите \"{0}\" в командную строку и нажмите ВВОД. Это должно перезапустить VS Code и вернуть вас к этому пошаговому руководству. "
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"walkthrough.windows.title.open.dev.command.prompt": "Sayfayı kullanarak yeniden {0}",
"walkthrough.windows.background.dev.command.prompt": " MSVC derleyicili bir Windows makinesi kullanıyorsunuz, dolayısıyla tüm ortam değişkenlerinin doğru ayarlanması için {0} öğesinden VS Code'u başlatmanız gerekiyor. {1} kullanarak yeniden başlatmak için:",
"walkthrough.open.command.prompt": "Windows Başlat menüsüne “{1}” yazarak {0} öğesini açın. Mevcut açık klasörünüze otomatik olarak gidecek olan {2} öğesini seçin.",
"walkthrough.windows.press.f5": "Komut istemine \"{0}\" yazın ve enter tuşuna basın. Bu, VS Code'u yeniden başlatmalı ve sizi bu izlenecek yola geri götürmelidir. "
}
28 changes: 27 additions & 1 deletion Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3376,6 +3376,12 @@
"default": "default",
"markdownDescription": "%c_cpp.configuration.copilotHover.markdownDescription%",
"scope": "window"
},
"C_Cpp.persistVsDeveloperEnvironment": {
"type": "boolean",
"default": true,
"markdownDescription": "%c_cpp.configuration.persistVsDeveloperEnvironment.description%",
"scope": "window"
}
}
}
Expand Down Expand Up @@ -3541,6 +3547,16 @@
"category": "C/C++",
"icon": "$(run)"
},
{
"command": "C_Cpp.SetVsDeveloperEnvironment",
"title": "%c_cpp.command.SetVsDeveloperEnvironment.title%",
"category": "C/C++"
},
{
"command": "C_Cpp.ClearVsDeveloperEnvironment",
"title": "%c_cpp.command.ClearVsDeveloperEnvironment.title%",
"category": "C/C++"
},
{
"command": "C_Cpp.AddDebugConfiguration",
"title": "%c_cpp.command.AddDebugConfiguration.title%",
Expand Down Expand Up @@ -6012,6 +6028,14 @@
"command": "C_Cpp.BuildAndRunFile",
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile"
},
{
"command": "C_Cpp.SetVsDeveloperEnvironment",
"when": "workspacePlatform == windows"
},
{
"command": "C_Cpp.ClearVsDeveloperEnvironment",
"when": "workspacePlatform == windows"
},
{
"command": "C_Cpp.AddDebugConfiguration",
"when": "config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isFolderOpen"
Expand Down Expand Up @@ -6636,6 +6660,8 @@
"node-fetch": "^2.7.0",
"node-loader": "^2.0.0",
"node-stream-zip": "^1.15.0",
"node-vcvarsall": "^1.1.0",
"node-vswhere": "^1.0.2",
"plist": "^3.1.0",
"posix-getopt": "^1.2.1",
"shell-quote": "^1.8.1",
Expand All @@ -6651,4 +6677,4 @@
"postcss": "^8.4.31",
"gulp-typescript/**/glob-parent": "^5.1.2"
}
}
}
15 changes: 9 additions & 6 deletions Extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"c_cpp.command.RemoveAllCodeAnalysisProblems.title": "Clear All Code Analysis Problems",
"c_cpp.command.BuildAndDebugFile.title": "Debug C/C++ File",
"c_cpp.command.BuildAndRunFile.title": "Run C/C++ File",
"c_cpp.command.SetVsDeveloperEnvironment.title": "Set Visual Studio Developer Environment",
"c_cpp.command.ClearVsDeveloperEnvironment.title": "Clear Visual Studio Developer Environment",
"c_cpp.command.AddDebugConfiguration.title": "Add Debug Configuration",
"c_cpp.command.GenerateDoxygenComment.title": "Generate Doxygen Comment",
"c_cpp.command.addSshTarget.title": "Add SSH target",
Expand Down Expand Up @@ -843,6 +845,7 @@
]
},
"c_cpp.configuration.debugShortcut.description": "Show the \"Run and Debug\" play button and \"Add Debug Configuration\" gear in the editor title bar for C++ files.",
"c_cpp.configuration.persistVsDeveloperEnvironment.description": "Remember the last used Visual Studio developer environment for the current workspace. This setting is only applicable for Windows.",
"c_cpp.debuggers.pipeTransport.description": "When present, this tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between VS Code and the MI-enabled debugger backend executable (such as gdb).",
"c_cpp.debuggers.pipeTransport.default.pipeProgram": "enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'.",
"c_cpp.debuggers.pipeTransport.default.debuggerPath": "The full path to the debugger on the target machine, for example /usr/bin/gdb.",
Expand Down Expand Up @@ -1003,9 +1006,9 @@
"c_cpp.debuggers.logging.category.warning.description": "Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise cause the application execution to stop.",
"c_cpp.debuggers.logging.category.error.description": "Logs that highlight when the current flow of execution is stopped due to a failure. These should indicate a failure in the current activity, not an application-wide failure.",
"c_cpp.debuggers.logging.category.none.description": "Not used for writing log messages. Specifies that a logging category should not write any messages.",
"c_cpp.walkthrough.title": "Get Started with C++ Development",
"c_cpp.walkthrough.title": "Get started with C++ development",
"c_cpp.walkthrough.description": "Dive into VS Code's rich C++ development experience.",
"c_cpp.walkthrough.set.up.title": "Set up your C++ Environment",
"c_cpp.walkthrough.set.up.title": "Set up your C++ environment",
"c_cpp.walkthrough.activating.description": "Activating the C++ extension to determine whether your C++ Environment has been set up.\nActivating Extension...",
"c_cpp.walkthrough.no.compilers.windows.description": "We could not find a C++ compiler on your machine, which is required to use the C++ extension. Follow the instructions on the right to install one, then click “Find my new Compiler” below.\n[Find my new Compiler](command:C_Cpp.RescanCompilers?%22walkthrough%22)",
"c_cpp.walkthrough.no.compilers.description": {
Expand All @@ -1025,15 +1028,15 @@
},
"c_cpp.walkthrough.create.cpp.file.altText": "Open a C++ file or a folder with a C++ project.",
"c_cpp.walkthrough.command.prompt.title": {
"message": "Launch from the Developer Command Prompt for VS",
"message": "Apply the Visual Studio developer environment",
"comment": [
"{Locked=\"Developer Command Prompt for VS\"}"
"{Locked=\"Visual Studio\"}"
]
},
"c_cpp.walkthrough.command.prompt.description": {
"message": "When using the Microsoft Visual Studio C++ compiler, the C++ extension requires you to launch VS Code from the Developer Command Prompt for VS. Follow the instructions on the right to relaunch.\n[Reload Window](command:workbench.action.reloadWindow)",
"message": "When using the Microsoft Visual Studio C++ compiler, the Visual Studio developer environment must be present.\n\nFollow the instructions on the right to relaunch or click the button below.\n[Set Developer Environment](command:C_Cpp.SetVsDeveloperEnvironment?%22walkthrough%22)",
"comment": [
"{Locked=\"Visual Studio\"} {Locked=\"C++\"} {Locked=\"VS Code\"} {Locked=\"Developer Command Prompt for VS\"} {Locked=\"\\\n[\"} {Locked=\"](command:workbench.action.reloadWindow)\"}"
"{Locked=\"Visual Studio\"} {Locked=\"C++\"} {Locked=\"\\\n[\"} {Locked=\"](command:C_Cpp.SetVsDeveloperEnvironment?%22walkthrough%22)\"}"
]
},
"c_cpp.walkthrough.run.debug.title": "Run and debug your C++ file",
Expand Down
Loading