Commit 6c3d410e authored by brucedawson's avatar brucedawson Committed by Commit bot

Improve error message when debuggers not installed

When building Chrome we require that you have the "Debugging tools for
Windows" feature of the Windows 10 SDK installed. The error messages
when this non-default component is not installed are a bit cryptic. This
adds a more explicit error message.

The new error message looks like this:

>gn gen out\debug
Traceback (most recent call last):
  File "c:/src/chromium4/src/build/vs_toolchain.py", line 448, in <module>
    sys.exit(main())
  File "c:/src/chromium4/src/build/vs_toolchain.py", line 444, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "c:/src/chromium4/src/build/vs_toolchain.py", line 309, in CopyDlls
    _CopyDebugger(target_dir, target_cpu)
  File "c:/src/chromium4/src/build/vs_toolchain.py", line 331, in _CopyDebugger
    '10 SDK.' % full_path)
Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbghelp.dll"
You must install the "Debugging Tools for Windows" feature from the Windows 10 SDK.
ERROR at //build/toolchain/win/BUILD.gn:39:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: c:/src/chromium4/src/out/debug/
Command: C:/src/depot_tools/python276_bin/python.exe -- c:/src/chromium4/src/build/vs_toolchain.py copy_dlls c:/src/chromium4/src/out/debug Debug x86
Returned 1.
See //BUILD.gn:65:1: which caused the file to be included.
group("gn_all") {
^----------------

R=wkorman@chromium.org
BUG=702697

Review-Url: https://codereview.chromium.org/2853083002
Cr-Commit-Position: refs/heads/master@{#468397}
parent da4b9983
...@@ -325,6 +325,10 @@ def _CopyDebugger(target_dir, target_cpu): ...@@ -325,6 +325,10 @@ def _CopyDebugger(target_dir, target_cpu):
debug_file = 'dbghelp.dll' debug_file = 'dbghelp.dll'
full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file) full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file)
if not os.path.exists(full_path):
raise Exception('dbghelp.dll not found in "%s"\r\nYou must install the '
'"Debugging Tools for Windows" feature from the Windows '
'10 SDK.' % full_path)
target_path = os.path.join(target_dir, debug_file) target_path = os.path.join(target_dir, debug_file)
_CopyRuntimeImpl(target_path, full_path) _CopyRuntimeImpl(target_path, full_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment