diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py index f7d0e7b..ab22023 100644 --- a/web/pgadmin/tools/debugger/__init__.py +++ b/web/pgadmin/tools/debugger/__init__.py @@ -1343,8 +1343,14 @@ def poll_end_execution_result(trans_id): if conn.connected(): statusmsg = conn.status_message() status, result, col_info = conn.poll() - if status == ASYNC_OK and session['functionData'][str(trans_id)]['language'] == 'edbspl': + if status == ASYNC_OK and \ + not session['functionData'][str(trans_id)]['is_func'] and \ + session['functionData'][str(trans_id)]['language'] == 'edbspl': status = 'Success' + additional_msgs = conn.messages() + if len(additional_msgs) > 0: + statusmsg = "
".join(additional_msgs) + "
" + statusmsg + return make_json_response(success=1, info=gettext("Execution Completed."), data={'status': status, 'status_message': statusmsg}) if result: @@ -1354,6 +1360,10 @@ def poll_end_execution_result(trans_id): data={'status': status, 'status_message': result}) else: status = 'Success' + additional_msgs = conn.messages() + if len(additional_msgs) > 0: + statusmsg = "
".join(additional_msgs) + "
" + statusmsg + columns = [] # Check column info is available or not if col_info is not None and len(col_info) > 0: diff --git a/web/pgadmin/tools/debugger/templates/debugger/js/direct.js b/web/pgadmin/tools/debugger/templates/debugger/js/direct.js index 7ec5e95..68b5589 100644 --- a/web/pgadmin/tools/debugger/templates/debugger/js/direct.js +++ b/web/pgadmin/tools/debugger/templates/debugger/js/direct.js @@ -405,7 +405,8 @@ define( ); // Update the message tab of the debugger - pgTools.DirectDebug.dbmsMessages.$elem.text(res.data.status_message); + if(res.data.status_message) + pgTools.DirectDebug.messages_panel.$container.find('.messages').html(res.data.status_message); // Execution completed so disable the buttons other than "Continue/Start" button because user can still // start the same execution again. @@ -433,7 +434,7 @@ define( ); // Update the message tab of the debugger - pgTools.DirectDebug.messages_panel.$container.find('.messages').text(res.data.status_message); + pgTools.DirectDebug.messages_panel.$container.find('.messages').html(res.data.status_message); // Execution completed so disable the buttons other than "Continue/Start" button because user can still // start the same execution again. @@ -467,7 +468,7 @@ define( function() { } ); - pgTools.DirectDebug.messages_panel.$container.find('.messages').text(res.data.status_message); + pgTools.DirectDebug.messages_panel.$container.find('.messages').html(res.data.status_message); pgTools.DirectDebug.messages_panel.focus(); // Execution completed so disable the buttons other than "Continue/Start" button because user can still