cancel
Showing results for 
Search instead for 
Did you mean: 

VSCode How to install VCPKG on VSCode with Zscaler/Proxy

Nawres GHARBI
ST Employee

Issue:  The VSCode don't have the ability to route the extension network requests to the proxy (only VSCode application network is routed to the proxy)

I -  the clean way (applies to network with Zscaler installed)

  1. ask for a Zscaler power user profile from your IT support
  2. request an access to those links if blocked by your firewall/proxy
    1. https://www.7-zip.org

    2.  https://github.com

    3.  https://aka.ms

    4.  https://artifacts.keil.arm.com

    5.  https://mirror.msys2.org

    6.  https://repo.msys2.org

 

II - The Workaround

  1. Set VSCode Proxy http://user:pass@domain:port
    NawresGHARBI_1-1704443433898.png
  2. Set Git Proxy correctly
    NawresGHARBI_2-1704443503313.png
  3. Set IE proxy correctly
     NawresGHARBI_3-1704443553581.png

     

  4. Set VCPKG_ROOT env variable 
    NawresGHARBI_4-1704443616206.png
  5. Install STM32 Extension
  6. VCPKG install
    1. Launch VSCode (re-launch after previous configurations)
    2. Open VSCode Terminal (view -> terminal)
    3. Cd c:\
    4. git clone https://github.com/microsoft/vcpkg
    5. .\vcpkg\bootstrap-vcpkg.bat (if you got an error check your git proxy)
    6. In the vcpkg folder create a “downloads” folder
    7. Download these packages and put them under vcpkg\downloads folder:
      1. https://www.7-zip.org/a/7z2301-extra.7z
      2. https://github.com/madler/zlib/archive/v1.3.tar.gz
    8. Type "vcpkg install 7zip" in the terminal
    9. Type "vcpkg integrate install" in the terminal
  7. VCPKG activation
    1. Open STM32 Extension
    2. Create a project
    3. Import the created project
      (at this level vcpkg is not functionalNawresGHARBI_5-1704443793376.png

       

      )
    4. In the vcpkg/download folder create a registry folder
    5. Download this zip and extract it in registry folder
      https://artifacts.keil.arm.com/vcpkg-ce-registry/registry.zip
    6. Open vcpkg-configuration.json file
      NawresGHARBI_6-1704443861785.png
    7. Replace the content by this text and save
      NawresGHARBI_7-1704443954236.png
    8. Open C:\vcpkg\vcpkg-configuration.json and do this modification
      NawresGHARBI_8-1704444006426.png
    9. Copy "c:\vcpkg" content to "C:\Users\xxxxx\AppData\Roaming\Code\User\globalStorage\ms-vscode.vscode-embedded-tools\vcpkg\root" and override files
    10. Close and restart VSCode

 

   

0 REPLIES 0