mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-27 22:18:21 +03:00
proton: Add support for PROTON_REMOTE_DEBUG_CMD to allow integration with remote debugger.
CW-Bug-Id: 16785
This commit is contained in:
parent
6f35d1e8bd
commit
5bc6cdaa8e
20
proton
20
proton
@ -856,6 +856,11 @@ class Session:
|
|||||||
else:
|
else:
|
||||||
self.env["WINEDEBUG"] = "-all"
|
self.env["WINEDEBUG"] = "-all"
|
||||||
|
|
||||||
|
if "PROTON_REMOTE_DEBUG_CMD" in self.env:
|
||||||
|
self.remote_debug_cmd = self.env.get("PROTON_REMOTE_DEBUG_CMD").split(" ")
|
||||||
|
else:
|
||||||
|
self.remote_debug_cmd = None
|
||||||
|
|
||||||
if update_prefix_files:
|
if update_prefix_files:
|
||||||
g_compatdata.setup_prefix()
|
g_compatdata.setup_prefix()
|
||||||
|
|
||||||
@ -1006,8 +1011,23 @@ class Session:
|
|||||||
self.dump_dbg_scripts()
|
self.dump_dbg_scripts()
|
||||||
except OSError:
|
except OSError:
|
||||||
log("Unable to write debug scripts! " + str(sys.exc_info()[1]))
|
log("Unable to write debug scripts! " + str(sys.exc_info()[1]))
|
||||||
|
|
||||||
|
if self.remote_debug_cmd:
|
||||||
|
remote_debug_proc = subprocess.Popen([g_proton.wine_bin] + self.remote_debug_cmd,
|
||||||
|
env=self.env, stderr=self.log_file, stdout=self.log_file)
|
||||||
|
else:
|
||||||
|
remote_debug_proc = None
|
||||||
|
|
||||||
self.run_proc([g_proton.wine_bin, "steam"] + sys.argv[2:] + self.cmdlineappend)
|
self.run_proc([g_proton.wine_bin, "steam"] + sys.argv[2:] + self.cmdlineappend)
|
||||||
|
|
||||||
|
if remote_debug_proc:
|
||||||
|
remote_debug_proc.kill()
|
||||||
|
try:
|
||||||
|
remote_debug_proc.communicate(2)
|
||||||
|
except subprocess.TimeoutExpired as e:
|
||||||
|
log("terminate remote debugger")
|
||||||
|
remote_debug_proc.terminate()
|
||||||
|
remote_debug_proc.communicate()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if not "STEAM_COMPAT_DATA_PATH" in os.environ:
|
if not "STEAM_COMPAT_DATA_PATH" in os.environ:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user