You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find the testdebug.testfunc(IN p1 character varying, IN p2 numeric, IN p3 character varying DEFAULT NULL::character varying) function in the schema tree
Right click -> Debugging -> Debug
Enter parameter values -> Debug
Click Step Into
In the new function Click Step Into
UI now "hangs" - all debugging buttons are greyed out
Expected behavior
The debugger should not hang, we should be able to step into the nested function as we can with the parent function
Error message
Full pgAdmin logs attached but relevant errors are
2025-02-11 20:36:24,368: SQL pgadmin: Status message for (Query-id: 3293912)
2025-02-11 20:36:24,368: SQL pgadmin: Polling result for (Query-id: 3293912)
2025-02-11 20:36:24,369: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:24] "GET /debugger/poll_end_execution_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:24,506: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:24] "GET /debugger/execute_query/5239296/step_into HTTP/1.1" 200 -
2025-02-11 20:36:24,630: SQL pgadmin: Status message for (Query-id: 3293912)
2025-02-11 20:36:24,630: SQL pgadmin: Polling result for (Query-id: 3293912)
2025-02-11 20:36:24,632: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:24] "GET /debugger/poll_end_execution_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:24,720: SQL pgadmin: Polling result for (Query-id: 7086391)
2025-02-11 20:36:24,721: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:24] "GET /debugger/poll_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:24,737: SQL pgadmin: Execute (void) by pgadmin4@pgadmin.org on postgres@localhost/test #12 - CONN:9001867 (Query-id: 2378430):
SET search_path="$user", public,public;
2025-02-11 20:36:24,753: SQL pgadmin: Execute (void) by pgadmin4@pgadmin.org on postgres@localhost/test #12 - CONN:9001867 (Query-id: 1656886):
SET search_path="$user", public,public;
2025-02-11 20:36:24,790: SQL pgadmin: Execute (dict) by pgadmin4@pgadmin.org on postgres@localhost/test #12 - CONN:9001867 (Query-id: 7311054):
SELECT * FROM pldbg_get_breakpoints(1::int)
2025-02-11 20:36:24,790: ERROR pgadmin: <asyncio.locks.Lock object at 0x10fc218e0 [unlocked, waiters:1]> is bound to a different event loop
Traceback (most recent call last):
File "/Applications/pgAdmin 4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg3/cursor.py", line 281, in execute
return asyncio.run(self._execute(query, params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg3/cursor.py", line 292, in _execute
return await _async_cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/psycopg/cursor_async.py", line 92, in execute
async with self._conn.lock:
^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/locks.py", line 105, in acquire
fut = self._get_loop().create_future()
^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/mixins.py", line 20, in _get_loop
raise RuntimeError(f'{self!r} is bound to a different event loop')
RuntimeError: <asyncio.locks.Lock object at 0x10fc218e0 [unlocked, waiters:1]> is bound to a different event loop
2025-02-11 20:36:24,794: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:24] "GET /debugger/execute_query/5239296/get_breakpoints HTTP/1.1" 200 -
2025-02-11 20:36:24,888: SQL pgadmin: Status message for (Query-id: 3293912)
2025-02-11 20:36:24,888: SQL pgadmin: Polling result for (Query-id: 3293912)
2025-02-11 20:36:24,889: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:24] "GET /debugger/poll_end_execution_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:25,147: SQL pgadmin: Status message for (Query-id: 3293912)
2025-02-11 20:36:25,147: SQL pgadmin: Polling result for (Query-id: 3293912)
2025-02-11 20:36:25,148: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:25] "GET /debugger/poll_end_execution_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:25,408: SQL pgadmin: Status message for (Query-id: 3293912)
2025-02-11 20:36:25,408: SQL pgadmin: Polling result for (Query-id: 3293912)
2025-02-11 20:36:25,409: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:25] "GET /debugger/poll_end_execution_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:25,669: SQL pgadmin: Status message for (Query-id: 3293912)
2025-02-11 20:36:25,669: SQL pgadmin: Polling result for (Query-id: 3293912)
2025-02-11 20:36:25,670: INFO werkzeug: 127.0.0.1 - - [11/Feb/2025 20:36:25] "GET /debugger/poll_end_execution_result/5239296/ HTTP/1.1" 200 -
2025-02-11 20:36:25,763: SQL pgadmin: Execute (void) by pgadmin4@pgadmin.org on postgres@localhost/test #12 - CONN:9001867 (Query-id: 4499284):
SET search_path="$user", public,public;
2025-02-11 20:36:25,764: ERROR pgadmin: <asyncio.locks.Lock object at 0x10fc218e0 [unlocked, waiters:1]> is bound to a different event loop
Traceback (most recent call last):
File "/Applications/pgAdmin 4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg3/cursor.py", line 281, in execute
return asyncio.run(self._execute(query, params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg3/cursor.py", line 292, in _execute
return await _async_cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/psycopg/cursor_async.py", line 92, in execute
async with self._conn.lock:
^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/locks.py", line 105, in acquire
fut = self._get_loop().create_future()
^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/mixins.py", line 20, in _get_loop
raise RuntimeError(f'{self!r} is bound to a different event loop')
RuntimeError: <asyncio.locks.Lock object at 0x10fc218e0 [unlocked, waiters:1]> is bound to a different event loop
2025-02-11 20:36:25,765: SQL pgadmin: Execute (async) by pgadmin4@pgadmin.org on postgres@localhost/test #12 - CONN:9001867 (Query-id: 3144023):
SELECT
p.func, p.targetName, p.linenumber,
pldbg_get_source(1::INTEGER, p.func) AS src,
(SELECT
s.args
FROM pldbg_get_stack(1::INTEGER) s
WHERE s.func = p.func ORDER BY s.level LIMIT 1) AS args
FROM pldbg_step_into(1::INTEGER) p
2025-02-11 20:36:25,766: ERROR pgadmin: <asyncio.locks.Lock object at 0x10fc218e0 [unlocked, waiters:1]> is bound to a different event loop
Traceback (most recent call last):
File "/Applications/pgAdmin 4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg3/cursor.py", line 281, in execute
return asyncio.run(self._execute(query, params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg3/cursor.py", line 292, in _execute
return await _async_cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/psycopg/cursor_async.py", line 92, in execute
async with self._conn.lock:
^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/locks.py", line 14, in __aenter__
await self.acquire()
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/locks.py", line 105, in acquire
fut = self._get_loop().create_future()
^^^^^^^^^^^^^^^^
File "/Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/mixins.py", line 20, in _get_loop
raise RuntimeError(f'{self!r} is bound to a different event loop')
RuntimeError: <asyncio.locks.Lock object at 0x10fc218e0 [unlocked, waiters:1]> is bound to a different event loop
Desktop (please complete the following information):
Describe the bug
Using the debugger to step into code.
When using the debugger and stepping into a nested function or procedure the UI hangs.
Enabling logging on pgAdmin reveals an error message in the logs.
To Reproduce
Steps to reproduce the behavior:
Create Postgres 15 server with plugin_debugger/pldbgapi extension installed
Create test schema and functions
Instructions for MacOS
testdebug.testfunc(IN p1 character varying, IN p2 numeric, IN p3 character varying DEFAULT NULL::character varying)
function in the schema treeExpected behavior
The debugger should not hang, we should be able to step into the nested function as we can with the parent function
Error message
Full pgAdmin logs attached but relevant errors are
Desktop (please complete the following information):
pgadmin4_v90_debug_stacktrace.log
pgadmin4_v812_debug_stacktrace.log
The text was updated successfully, but these errors were encountered: