19

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?

Greg82
  • 1,000
  • 3
  • 10
  • 24
  • 2
    VS ships with a compact version of the SDK, only what you need to build and debug with VS. The full SDK is a separate download. – Hans Passant Sep 16 '17 at 19:17
  • 9
    You do not need to download a separate installer, just modify the SDK under Programs and Features to enable the 'Debugging Tools for Windows'. See this [posting](https://stackoverflow.com/a/38685339/731081) for more info. – sonyisda1 Jun 14 '18 at 19:36

3 Answers3

36

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.

Zbyněk Winkler
  • 1,263
  • 1
  • 12
  • 12
  • 2
    _Apps & features_ is a feature of Windows 10, on Windows 8.1 you should go to _Control Panel > Uninstall or change a program_, select the last _Windows Software Development Kit - Windows _ on the list and click in _Change_ on the top, so the dialog will give the option to select the Debug Tools to install, as said above. – Juliao Jan 19 '19 at 19:05
  • 2
    From what am I concerned this answer should be marked as a solution, as it provides a resolution to the question. – CristiFati Feb 20 '19 at 16:46
  • For me the modify button did just open a dialog which closes immediately. For me worked to download https://go.microsoft.com/fwlink/p/?LinkId=838916 and install debugging tools there. Here is the archive https://developer.microsoft.com/de-de/windows/downloads/sdk-archive – fassl Sep 10 '19 at 08:49
  • The directory `Debuggers` doesn't seem to exist any longer or the installation of the Windows Kit 10 doesn't work... – jaques-sam Jun 08 '21 at 13:39
  • @fassl I had the same problem because I clicked modify on "Windows SDK AddOn". It worked when I used "Windows Software Development Kit - ..." – flxkrmr Apr 15 '23 at 06:02
15

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/)

conio
  • 3,681
  • 1
  • 20
  • 34
12

Conio already answered, but I'll add a more detailed description for Windows 10. Go to "Apps & Features", search for "Windows Software Development Kit", click on "change" (in the picture "Ändern"), click "change" again, then select "Debugging Tools for Windows". enter image description here enter image description here enter image description here

user2366975
  • 4,350
  • 9
  • 47
  • 87