diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-05 16:28:09 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-05 16:28:09 -0700 |
| commit | 1c9838b55147c5a564e83f25d4fd5ab543144340 (patch) | |
| tree | fa721ed60784366f94dcf0a0cc204031a489a0e0 /toolsrc/src | |
| parent | 4143dc0c2b219371b0461d4588c2faae2be1c600 (diff) | |
| download | vcpkg-1c9838b55147c5a564e83f25d4fd5ab543144340.tar.gz vcpkg-1c9838b55147c5a564e83f25d4fd5ab543144340.zip | |
[vcpkg-debug] Add debugging for calls to cmd_execute_clean()
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg.cpp | 1 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg_System.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 796053941..aa19df616 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -184,6 +184,7 @@ int wmain(const int argc, const wchar_t* const* const argv) { auto elapsed_us = g_timer.microseconds(); Metrics::track_metric("elapsed_us", elapsed_us); + g_debugging = false; Metrics::flush(); }); diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index f000b7317..4329219c2 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "vcpkg_System.h" #include "vcpkg_Checks.h" +#include "vcpkglib.h" namespace vcpkg::System { @@ -86,7 +87,11 @@ namespace vcpkg::System // Basically we are wrapping it in quotes const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); + if (g_debugging) + System::println("[DEBUG] _wspawnlpe(cmd.exe /c %s)", Strings::utf16_to_utf8(actual_cmd_line)); auto exit_code = _wspawnlpe(_P_WAIT, L"cmd.exe", L"cmd.exe", L"/c", actual_cmd_line.c_str(), nullptr, env_cstr.data()); + if (g_debugging) + System::println("[DEBUG] _wspawnlpe() returned %d", exit_code); return static_cast<int>(exit_code); } |
