summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2022-09-17 17:48:50 +0800
committerMoonchild <moonchild@palemoon.org>2022-10-23 21:30:17 +0000
commitd8ef6bf7af085c252027fd3cfc6106ca69c61df4 (patch)
tree50dda6cd0fb3268d1987b43daea425b03025e5db /testing
parent825fb3a207f21254f4f0a65f6433d6a9650050aa (diff)
downloaduxp-d8ef6bf7af085c252027fd3cfc6106ca69c61df4.tar.gz
Issue #1956 - Look for Visual Studio's path directly in the mozdebug module
This change modifies the mozdebug module to include a special case for Visual Studio when looking for its path. This also removes the workaround implemented in dcb027a7184442e140aad1921a5f26fe9135c1da which can break debugging in certain installations of Visual Studio 2015.
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/mozbase/mozdebug/mozdebug/mozdebug.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/testing/mozbase/mozdebug/mozdebug/mozdebug.py b/testing/mozbase/mozdebug/mozdebug/mozdebug.py
index 5777a0001a..6dd9e9fddd 100755
--- a/testing/mozbase/mozdebug/mozdebug/mozdebug.py
+++ b/testing/mozbase/mozdebug/mozdebug/mozdebug.py
@@ -105,6 +105,19 @@ def get_debugger_path(debugger):
# Just default to find_executable instead.
pass
+ if mozinfo.os == 'win' and debugger == 'devenv.exe':
+ # We can no longer rely on PATH for finding the executable of newer
+ # versions of Visual Studio due to changes in their deployment and
+ # extensibility models. Instead, we use Microsoft's vswhere utility
+ # for this purpose.
+ try:
+ path = check_output(['vswhere', '-property', 'productPath']).strip()
+ if path:
+ return path
+ except:
+ # Just default to find_executable instead.
+ pass
+
return find_executable(debugger)
@@ -213,7 +226,7 @@ def get_default_debugger_name(search=DebuggerSearch.OnlyFirst):
# Finally get the debugger information.
for debuggerName in debuggerPriorities:
- debuggerPath = find_executable(debuggerName)
+ debuggerPath = get_debugger_path(debuggerName)
if debuggerPath:
return debuggerName
elif not search == DebuggerSearch.KeepLooking: