Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Debugging Tools with Visual Studio 2017 installer? [duplicate]

I need cdb.exe as a debugger for QT Creator. I know that cdb is available as a part of Windows SDK, but is not installed when I install Windows SDK through Visual Studio 2017 installer.

On the other hand, if I install Windows SDK standalone (available here), I can select "Debugging Tools", and finally I get the expected folder Debuggers in Windows kits, that contains cdb.

How can I get cdb during Visual Studio install?

like image 587
Greg82 Avatar asked Sep 15 '17 10:09

Greg82


People also ask

Can I have 2 versions of Visual Studio installed?

For VSPackages, that means a user can have several Visual Studio versions installed on the same computer. However, you cannot have side-by-side versions of your VSPackages loaded into a single version of Visual Studio.

How do I attach a process in Visual Studio 2017 for debugging?

You can attach the Visual Studio debugger to a running process on a local or remote computer. After the process is running, select Debug > Attach to Process or press Ctrl+Alt+p in Visual Studio, and use the Attach to Process dialog to attach the debugger to the process.

Where is Msvsmon EXE located?

Files Related to msvsmon.exe C:\Program Files (x86)\Microsoft SDKs\Windows\v... C:\Program Files (x86)\Microsoft SDKs\Windows\v...


2 Answers

As you noticed, Visual Studio does not allow you to set any options when installing the SDK. However, after the SDK is installed, all you need to do is finding it in "Apps & features" and selecting "Modify". That will present you the options dialog where you can check "Debugging Tools for Windows¨. For me (SDK 10.0.17134.12) it creates the file

c:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe

that I set as debugger in Qt Creator. I use it to debug 32bit applications built with msvc2008 express.

like image 71
Zbyněk Winkler Avatar answered Sep 20 '22 16:09

Zbyněk Winkler


You can't.

When the Visual Studio installer (2017, 2015, or any other one) gives you the checkbox for "Windows SDK 10.xxxxx" it really means "only the headers (.h), libraries (.lib), metadata (.winmd), etc. from the Windows SDK 10.xxxxx".

It does not include any of the options you see in the Windows SDK installer other than "Windows Software Development Kit". Neither WinDbg and the Debugging Tools for Windows, nor xperf and the Windows Performance Toolkit, nor Application Verifier, nor any of the other things you see int the SDK installer are included by selecting that checkbox in the VS installer.

The term "Windows SDK" is overloaded with two meanings which are related but not the same. sdksetup.exe can install Windows SDK1, while the VS installer installs Windows SDK2 (which is a subset of Windows SDK1).

enter image description here (Ignore the arrow. Image source: https://www.raymond.cc/blog/analyze-windows-7-performance-with-microsoft-windows-performance-toolkit/)

like image 36
conio Avatar answered Sep 18 '22 16:09

conio