Files
nixpkgs/pkgs/development/python-modules/debugpy/hardcode-lldb.patch
2026-10-10 14:06:23 -04:00

27 lines
1.5 KiB
Diff

diff --git a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
index ba7221fe..24efc1ed 100644
--- a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
+++ b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
@@ -503,7 +503,7 @@ def run_python_code_mac(pid, python_code, connect_debugger_tracing=False, show_d
is_debug = 0
# Note that the space in the beginning of each line in the multi-line is important!
cmd = [
- "lldb",
+ '@lldb@/bin/lldb',
"--no-lldbinit", # Do not automatically parse any '.lldbinit' files.
# '--attach-pid',
# str(pid),
diff --git a/tests/debugpy/server/test_add_code_to_python_process.py b/tests/debugpy/server/test_add_code_to_python_process.py
--- a/tests/debugpy/server/test_add_code_to_python_process.py
+++ b/tests/debugpy/server/test_add_code_to_python_process.py
@@ -117,8 +117,8 @@ def test_lldb_command(acpp):
(cmd,), kwargs = check_call.call_args
assert kwargs["shell"]
- assert cmd.startswith("lldb --no-lldbinit --script-language Python ")
+ assert cmd.startswith("@lldb@/bin/lldb --no-lldbinit --script-language Python ")
assert "-o 'process attach --pid 4242'" in cmd
assert "-o 'command script import \"%s\"'" % (lldb_prepare,) in cmd
assert '-o \'load_lib_and_attach "%s" 0 "print(1)" 7\'' % (target_dll,) in cmd
assert "-o 'process detach'" in cmd