Skip to content

Commit 34e1e40

Browse files
committed
Fix pydevd_attach_to_process Windows build script to locate VC++ using vswhere.
Update pydevd_attach_to_process binaries.
1 parent 5384d23 commit 34e1e40

13 files changed

+8
-2
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
1+
@set VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
2+
@echo Using vswhere at %VSWHERE%
3+
@for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VSDIR=%%i
4+
@echo Using Visual C++ at %VSDIR%
5+
6+
call "%VSDIR%\VC\Auxiliary\Build\vcvarsall.bat" x86
27

38
cl -DUNICODE -D_UNICODE /EHsc /Zi /O1 /W3 /LD /MD /Qspectre attach.cpp /link /DEBUG /OPT:REF /OPT:ICF /GUARD:CF /out:attach_x86.dll
49
copy attach_x86.dll ..\attach_x86.dll /Y
@@ -12,7 +17,8 @@ cl /EHsc /Zi /O1 /W3 /Qspectre inject_dll.cpp /link /DEBUG /OPT:REF /OPT:ICF /G
1217
copy inject_dll_x86.exe ..\inject_dll_x86.exe /Y
1318
copy inject_dll_x86.pdb ..\inject_dll_x86.pdb /Y
1419

15-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
20+
call "%VSDIR%\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
21+
1622
cl -DUNICODE -D_UNICODE /EHsc /Zi /O1 /W3 /LD /MD /Qspectre attach.cpp /link /DEBUG /OPT:REF /OPT:ICF /GUARD:CF /out:attach_amd64.dll
1723
copy attach_amd64.dll ..\attach_amd64.dll /Y
1824
copy attach_amd64.pdb ..\attach_amd64.pdb /Y

0 commit comments

Comments
 (0)