public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: Neel Patel <[email protected]>
Cc: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: PATCH: To fix the issue in Debugger module (pgAdmin4)
Date: Fri, 11 Nov 2016 17:32:19 +0530
Message-ID: <CAKKotZR1fL-ykdL0o9FuVVKe_YAwESbvVBpZKYZMAxukp50z3w@mail.gmail.com> (raw)
In-Reply-To: <CACCA4P3QPMzmrktKDpvq-Oja30ryeJJcTdouXN+Pz7ci2tkvog@mail.gmail.com>
References: <CAKKotZQz6mGEiky_Szo91tzm_RFvwJTYGriTmuxVYrhcWi5nJg@mail.gmail.com>
	<CA+OCxoxkphr1YF6F53j3sTreTMvoBOKqV+wjF6CnxoQ-SA+rzA@mail.gmail.com>
	<CAKKotZRMetEEPzFTuqiw_8Vit2_STHSN22=K+5frJBu7=Jp6PQ@mail.gmail.com>
	<CAKKotZQGdhiFrtNK0xz8OVLKOA2QCk_yfOZDFT+HEMfELzbk4A@mail.gmail.com>
	<CA+OCxoyzS4_cST0qJ7CbmxqOry4wGZCQkoiLpcXgjr2N4snPQw@mail.gmail.com>
	<CAKKotZSjyeZT_bS8_No-cEftRjqPPptLx+zV2+_DqV=KYZYRcw@mail.gmail.com>
	<CA+OCxoyLMvyRpPSMztrUf0st7yGvyeYquOmyFabQzg6Czieh=Q@mail.gmail.com>
	<CAKKotZRW4WF2gsaPu-cRZJmrAia0GiDTOhwDKQdUpBC5VRoVjQ@mail.gmail.com>
	<CA+OCxoyF37xc+S4=r37KRAEh+zUfN4-WBSSv1YSe1VZpMmNfkg@mail.gmail.com>
	<CAKKotZSz3kgLYGNyu_BGORF+J=F2qmLa-2z9Rzq1HgSjXjTyZg@mail.gmail.com>
	<CA+OCxoymEzDsLaABZixOjQ37jJdP1J7+xJ6By_oJHi=2bSRoRg@mail.gmail.com>
	<CAKKotZSrWzCVBbuywF8VFGMtMK-VdT=fyo_3gY97OnoO7hZspw@mail.gmail.com>
	<CA+OCxowWbW6sYELhWiCGW3znKE6Fk19Hwuns8BzZHd94iqABnA@mail.gmail.com>
	<CA+OCxozg9xXuCy86gaxvnfX646XpeP5c9g0ycW1oE-k-jg22cA@mail.gmail.com>
	<CAKKotZRA0sLv6Aiua2h8FXpyqrjXg=Wt6WipVK4O_xCpdnfvgA@mail.gmail.com>
	<CA+OCxoyCRkmA29pCZh9PhG0ZSLgRYwX+5yyqHCYTxZjkDVHcHw@mail.gmail.com>
	<CACCA4P2BOCiNDisEfTi_aSTSugUFTjZea-YZ-AWZNSBN8Lj63w@mail.gmail.com>
	<CA+OCxoyjy2T0iCKR_ACkp7sZyJ0+R-0UT75zkyAwahn36R5fpQ@mail.gmail.com>
	<CACCA4P3QPMzmrktKDpvq-Oja30ryeJJcTdouXN+Pz7ci2tkvog@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi Dave,

PFA updated patch, Both of the issues pointed by you in last email are
addressed in this patch.
Please review.

RM#1227


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Oct 21, 2016 at 5:57 PM, Neel Patel <[email protected]>
wrote:

> Hi,
>
>
> On Fri, Oct 21, 2016 at 5:03 PM, Dave Page <[email protected]> wrote:
>
>> Hi
>>
>> On Fri, Oct 21, 2016 at 12:32 PM, Neel Patel
>> <[email protected]> wrote:
>> > Hi,
>> >
>> >
>> > On Fri, Oct 21, 2016 at 4:48 PM, Dave Page <[email protected]> wrote:
>> >>
>> >> Hi
>> >>
>> >> There are still issues I'm afraid:
>> >>
>> >> - When execution stops, we seem to keep polling for more results
>> >> indefinitely.
>> >
>> > Do you mean after completion of first successful debugging ?
>> > If yes, we are polling because user can start same function for
>> debugging
>> > again and we have to listen for the result set for that session.
>>
> Yes (or the second). But shouldn't we stop polling until debugging is
>> restarted?
>>
>
>
Fixed

> I think yes, that can be done.
>
>>
>> >>
>> >>
>> >> - When executing for a second time, the messages tab isn't cleared,
>> >> and new messages don't seem to be appended to it either. I would
>> >> expect the tab to be cleared.
>> >
>>
> Fixed

> >
>> > Ok. We will fix this issue.
>> >>
>> >>
>> >> On Thu, Oct 20, 2016 at 9:14 AM, Murtuza Zabuawala
>> >> <[email protected]> wrote:
>> >> > Hi Dave,
>> >> >
>> >> > PFA updated patch for the same.
>> >> >
>> >> > Issue:
>> >> > We were not properly fetching result from server in case of direct
>> >> > debugging
>> >> > when we restart debugging of same object.
>> >> >
>> >> > Thanks to Neel for helping in this issue.
>> >> >
>> >> > Please review.
>> >> >
>> >> > --
>> >> > Regards,
>> >> > Murtuza Zabuawala
>> >> > EnterpriseDB: http://www.enterprisedb.com
>> >> > The Enterprise PostgreSQL Company
>> >> >
>> >> > On Fri, Oct 7, 2016 at 5:32 PM, Dave Page <[email protected]> wrote:
>> >> >>
>> >> >> On Fri, Oct 7, 2016 at 12:53 PM, Dave Page <[email protected]>
>> wrote:
>> >> >> > On Fri, Oct 7, 2016 at 12:42 PM, Murtuza Zabuawala
>> >> >> > <[email protected]> wrote:
>> >> >> >> Hi Dave,
>> >> >> >>
>> >> >> >> I faced the same issue when I initially tried that, but then as
>> per
>> >> >> >> Neel
>> >> >> >> suggestion I changed SELECT pg_sleep() to PERFORM pg_sleep() in
>> >> >> >> function.
>> >> >> >> You will face the same in pgAdmin3 if you use select pg_sleep()
>> in
>> >> >> >> your
>> >> >> >> function the debug call never returns from DB server.
>> >> >> >
>> >> >> > In which case, doesn't that imply the debugger is missing critical
>> >> >> > debug info? If I run the query in the query tool, I get:
>> >> >> >
>> >> >> > ====
>> >> >> > INFO:  EMPNO    ENAME
>> >> >> > INFO:  -----    -------
>> >> >> > ERROR:  query has no destination for result data
>> >> >> > HINT:  If you want to discard the results of a SELECT, use PERFORM
>> >> >> > instead.
>> >> >> > CONTEXT:  PL/pgSQL function list_emp() line 11 at SQL statement
>> >> >> >
>> >> >> >
>> >> >> > Query returned successfully in 2 secs.
>> >> >> > ====
>> >> >> >
>> >> >> > It seems to me that the debugger should be able to give the same
>> >> >> > error.
>> >> >> >
>> >> >> > Regardless of that, I'll test with PERFORM.
>> >> >>
>> >> >> Which I just did - and whilst it seemed to be fine when stepping
>> >> >> through, after a few iterations I hit the continue button, at which
>> >> >> point it froze again on "PERFORM pg_sleep(2)", didn't print any more
>> >> >> of the 14 names in the emp table, and didn't return :-(
>> >> >>
>> >> >> --
>> >> >> Dave Page
>> >> >> Blog: http://pgsnake.blogspot.com
>> >> >> Twitter: @pgsnake
>> >> >>
>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> >> The Enterprise PostgreSQL Company
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >> --
>> >> Sent via pgadmin-hackers mailing list ([email protected])
>> >> To make changes to your subscription:
>> >> http://www.postgresql.org/mailpref/pgadmin-hackers
>> >
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] RM_1227_v8.patch (17.7K, 3-RM_1227_v8.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py
index 7d83ecb..24d00ad 100644
--- a/web/pgadmin/tools/debugger/__init__.py
+++ b/web/pgadmin/tools/debugger/__init__.py
@@ -1354,9 +1354,22 @@ def poll_end_execution_result(trans_id):
 
     if conn.connected():
         statusmsg = conn.status_message()
+        if statusmsg and statusmsg == 'SELECT 1':
+            statusmsg = ''
         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:
+                additional_msgs = [msg.strip("\n") for msg in additional_msgs]
+                additional_msgs = "<br>".join(additional_msgs)
+                if statusmsg:
+                    statusmsg = additional_msgs + "<br>" + statusmsg
+                else:
+                    statusmsg = additional_msgs
+
             return make_json_response(success=1, info=gettext("Execution Completed."),
                                       data={'status': status, 'status_message': statusmsg})
         if result:
@@ -1366,6 +1379,15 @@ 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:
+                    additional_msgs = [msg.strip("\n") for msg in additional_msgs]
+                    additional_msgs = "<br>".join(additional_msgs)
+                    if statusmsg:
+                        statusmsg = additional_msgs + "<br>" + statusmsg
+                    else:
+                        statusmsg = additional_msgs
+
                 columns = []
                 # Check column info is available or not
                 if col_info is not None and len(col_info) > 0:
@@ -1381,6 +1403,17 @@ def poll_end_execution_result(trans_id):
                                                 'col_info': columns, 'status_message': statusmsg})
         else:
             status = 'Busy'
+            additional_msgs = conn.messages()
+            if len(additional_msgs) > 0:
+                additional_msgs = [msg.strip("\n") for msg in additional_msgs]
+                additional_msgs = "<br>".join(additional_msgs)
+                if statusmsg:
+                    statusmsg = additional_msgs + "<br>" + statusmsg
+                else:
+                    statusmsg = additional_msgs
+            return make_json_response(data={
+                'status': status, 'result': result, 'status_message': statusmsg
+            })
     else:
         status = 'NotConnected'
         result = gettext('Not connected to server or connection with the server has been closed.')
diff --git a/web/pgadmin/tools/debugger/static/css/debugger.css b/web/pgadmin/tools/debugger/static/css/debugger.css
index 4386775..e1177a8 100644
--- a/web/pgadmin/tools/debugger/static/css/debugger.css
+++ b/web/pgadmin/tools/debugger/static/css/debugger.css
@@ -67,3 +67,14 @@
 .CodeMirror-foldgutter-folded:after {
   content: "\25B6";
 }
+
+/* To make font same as Query tool in messages tab */
+.messages {
+    white-space: pre-wrap;
+    font-family: monospace;
+    padding-top: 5px;
+    padding-left: 10px;
+    overflow: auto;
+    height: 100%;
+    font-size: 0.925em;
+}
\ No newline at end of file
diff --git a/web/pgadmin/tools/debugger/templates/debugger/js/direct.js b/web/pgadmin/tools/debugger/templates/debugger/js/direct.js
index 452617b..2c5d05d 100644
--- a/web/pgadmin/tools/debugger/templates/debugger/js/direct.js
+++ b/web/pgadmin/tools/debugger/templates/debugger/js/direct.js
@@ -164,6 +164,9 @@ define(
 
               // Call function to create and update local variables ....
               self.GetStackInformation(trans_id);
+              if (pgTools.DirectDebug.debug_type) {
+                self.poll_end_execution_result(trans_id);
+              }
             }
             else if (res.data.status === 'NotConnected') {
               Alertify.alert(
@@ -194,6 +197,13 @@ define(
               // Call function to create and update local variables
               self.AddLocalVariables(res.data.result);
               self.AddParameters(res.data.result);
+              // If debug function is restarted then again start listener to read the updated messages.
+              if (pgTools.DirectDebug.debug_restarted) {
+                if (pgTools.DirectDebug.debug_type) {
+                  self.poll_end_execution_result(trans_id);
+                }
+                pgTools.DirectDebug.debug_restarted = false;
+              }
             }
             else if (res.data.status === 'NotConnected') {
               Alertify.alert(
@@ -245,6 +255,12 @@ define(
       */
       poll_result: function(trans_id) {
       var self = this;
+
+      // Do we need to pool?
+      if(!pgTools.DirectDebug.is_polling_required){
+        return;
+      }
+
       // Make ajax call to listen the database message
       var baseUrl = "{{ url_for('debugger.index') }}" + "poll_result/" + trans_id;
 
@@ -363,13 +379,32 @@ define(
 
     },
 
+    // This function will update messages tab
+    update_messages: function(msg) {
+      var old_msgs='', new_msgs='';
+        old_msgs = pgTools.DirectDebug.messages_panel.$container.find('.messages').html();
+        if(old_msgs) {
+          new_msgs = (old_msgs + '\n' + msg)
+                        .replace(/(?:\r\n|\r|\n)/g, '<br />') // Newlines with <br>
+                        .replace(/(<br\ ?\/?>)+/g, '<br />'); // multiple <br> with single <br>
+        } else {
+          new_msgs = msg;
+        }
+        pgTools.DirectDebug.messages_panel.$container.find('.messages').html(new_msgs);
+    },
+
     /*
       For the direct debugging, we need to check weather the functions execution is completed or not. After completion
       of the debugging, we will stop polling the result  until new execution starts.
     */
     poll_end_execution_result: function(trans_id) {
       var self = this;
-      //return;
+
+      // Do we need to pool?
+      if(!pgTools.DirectDebug.is_polling_required){
+        return;
+      }
+
       // Make ajax call to listen the database message
       var baseUrl = "{{ url_for('debugger.index') }}" + "poll_end_execution_result/" + trans_id;
 
@@ -411,7 +446,9 @@ define(
                 );
 
                 // Update the message tab of the debugger
-                pgTools.DirectDebug.dbmsMessages.$elem.text(res.data.status_message);
+                if (res.data.status_message) {
+                  self.update_messages(res.data.status_message);
+                }
 
                 // Execution completed so disable the buttons other than "Continue/Start" button because user can still
                 // start the same execution again.
@@ -420,6 +457,10 @@ define(
                 self.enable('step_into', false);
                 self.enable('toggle_breakpoint', false);
                 self.enable('clear_all_breakpoints', false);
+                self.enable('continue', true);
+                // Stop further pooling
+                pgTools.DirectDebug.is_polling_required = false;
+
               }
               else {
                 // Call function to create and update local variables ....
@@ -439,7 +480,9 @@ define(
                   );
 
                   // Update the message tab of the debugger
-                  pgTools.DirectDebug.messages_panel.$container.find('.messages').text(res.data.status_message);
+                  if (res.data.status_message) {
+                    self.update_messages(res.data.status_message);
+                  }
 
                   // Execution completed so disable the buttons other than "Continue/Start" button because user can still
                   // start the same execution again.
@@ -448,12 +491,20 @@ define(
                   self.enable('step_into', false);
                   self.enable('toggle_breakpoint', false);
                   self.enable('clear_all_breakpoints', false);
+                  self.enable('continue', true);
+
+                  // Stop further pooling
+                  pgTools.DirectDebug.is_polling_required = false;
                 }
               }
             }
             else if (res.data.status === 'Busy') {
               // If status is Busy then poll the result by recursive call to the poll function
-              //self.poll_end_execution_result(trans_id);
+              self.poll_end_execution_result(trans_id);
+              // Update the message tab of the debugger
+              if (res.data.status_message) {
+                self.update_messages(res.data.status_message);
+              }
             }
             else if (res.data.status === 'NotConnected') {
               Alertify.alert(
@@ -473,7 +524,11 @@ define(
                 function() { }
               );
 
-              pgTools.DirectDebug.messages_panel.$container.find('.messages').text(res.data.status_message);
+              // Update the message tab of the debugger
+              if (res.data.status_message) {
+                self.update_messages(res.data.status_message);
+              }
+
               pgTools.DirectDebug.messages_panel.focus();
 
               // Execution completed so disable the buttons other than "Continue/Start" button because user can still
@@ -483,6 +538,10 @@ define(
               self.enable('step_into', false);
               self.enable('toggle_breakpoint', false);
               self.enable('clear_all_breakpoints', false);
+              self.enable('continue', true);
+
+              // Stop further pooling
+              pgTools.DirectDebug.is_polling_required = false;
             }
           },
           error: function(e) {
@@ -498,7 +557,17 @@ define(
 
     Restart: function(trans_id) {
 
-      var baseUrl = "{{ url_for('debugger.index') }}" + "restart/" + trans_id;
+      var self = this,
+        baseUrl = "{{ url_for('debugger.index') }}" + "restart/" + trans_id;
+      self.enable('stop', false);
+      self.enable('step_over', false);
+      self.enable('step_into', false);
+      self.enable('toggle_breakpoint', false);
+      self.enable('clear_all_breakpoints', false);
+      self.enable('continue', false);
+
+      // Clear msg tab
+      pgTools.DirectDebug.messages_panel.$container.find('.messages').html('');
 
       $.ajax({
         url: baseUrl,
@@ -506,6 +575,15 @@ define(
           // Restart the same function debugging with previous arguments
           var restart_dbg = res.data.restart_debug ? 1 : 0;
 
+          // Start pooling again
+          pgTools.DirectDebug.is_polling_required = true;
+          self.poll_end_execution_result(trans_id);
+          self.poll_result(trans_id);
+
+          if (restart_dbg) {
+            pgTools.DirectDebug.debug_restarted = true;
+          }
+
           /*
            Need to check if restart debugging really require to open the input dialog ?
            If yes then we will get the previous arguments from database and populate the input dialog
@@ -522,6 +600,9 @@ define(
               url: baseUrl,
               method: 'GET',
               success: function(res) {
+                if (pgTools.DirectDebug.debug_type) {
+                  self.poll_end_execution_result(trans_id);
+                }
               },
               error: function(e) {
                 Alertify.alert(
@@ -546,6 +627,12 @@ define(
     // Continue the execution until the next breakpoint
     Continue: function(trans_id) {
       var self = this;
+      self.enable('stop', false);
+      self.enable('step_over', false);
+      self.enable('step_into', false);
+      self.enable('toggle_breakpoint', false);
+      self.enable('clear_all_breakpoints', false);
+      self.enable('continue', false);
 
       //Check first if previous execution was completed or not
       if (pgTools.DirectDebug.direct_execution_completed &&
@@ -562,9 +649,6 @@ define(
           success: function(res) {
             if (res.data.status) {
               self.poll_result(trans_id);
-              if (pgTools.DirectDebug.debug_type) {
-                self.poll_end_execution_result(trans_id);
-              }
             }
             else {
               Alertify.alert(
@@ -583,6 +667,12 @@ define(
 
       Step_over: function(trans_id) {
         var self = this;
+        self.enable('stop', false);
+        self.enable('step_over', false);
+        self.enable('step_into', false);
+        self.enable('toggle_breakpoint', false);
+        self.enable('clear_all_breakpoints', false);
+        self.enable('continue', false);
 
         // Make ajax call to listen the database message
         var baseUrl = "{{ url_for('debugger.index') }}" + "execute_query/" + trans_id + "/" + "step_over";
@@ -593,9 +683,6 @@ define(
           success: function(res) {
             if (res.data.status) {
               self.poll_result(trans_id);
-              if (pgTools.DirectDebug.debug_type) {
-                self.poll_end_execution_result(trans_id);
-              }
             }
             else {
               Alertify.alert(
@@ -613,6 +700,12 @@ define(
 
       Step_into: function(trans_id) {
         var self = this;
+        self.enable('stop', false);
+        self.enable('step_over', false);
+        self.enable('step_into', false);
+        self.enable('toggle_breakpoint', false);
+        self.enable('clear_all_breakpoints', false);
+        self.enable('continue', false);
 
         // Make ajax call to listen the database message
         var baseUrl = "{{ url_for('debugger.index') }}" + "execute_query/" + trans_id + "/" + "step_into";
@@ -623,9 +716,6 @@ define(
           success: function(res) {
             if (res.data.status) {
               self.poll_result(trans_id);
-              if (pgTools.DirectDebug.debug_type) {
-                self.poll_end_execution_result(trans_id);
-              }
             }
             else {
               Alertify.alert(
@@ -643,6 +733,12 @@ define(
 
       Stop: function(trans_id) {
         var self = this;
+        self.enable('stop', false);
+        self.enable('step_over', false);
+        self.enable('step_into', false);
+        self.enable('toggle_breakpoint', false);
+        self.enable('clear_all_breakpoints', false);
+        self.enable('continue', true);
 
         // Make ajax call to listen the database message
         var baseUrl = "{{ url_for('debugger.index') }}" + "execute_query/" + trans_id + "/" + "abort_target";
@@ -665,12 +761,8 @@ define(
               );
 
               //Disable the buttons other than continue button. If user wants to again then it should allow to debug again...
-              self.enable('stop', false);
-              self.enable('step_over', false);
-              self.enable('step_into', false);
-              self.enable('continue', false);
-              self.enable('toggle_breakpoint', false);
-              self.enable('clear_all_breakpoints', false);
+              self.enable('continue', true);
+
             }
             else if (res.data.status === 'NotConnected') {
               Alertify.alert(
@@ -688,6 +780,13 @@ define(
 
       toggle_breakpoint: function(trans_id) {
         var self = this;
+        self.enable('stop', false);
+        self.enable('step_over', false);
+        self.enable('step_into', false);
+        self.enable('toggle_breakpoint', false);
+        self.enable('clear_all_breakpoints', false);
+        self.enable('continue', false);
+
 
         var info = pgTools.DirectDebug.editor.lineInfo(self.active_line_no);
         var baseUrl = '';
@@ -720,6 +819,12 @@ define(
                     return marker;
                 }());
               }
+              self.enable('stop', true);
+              self.enable('step_over', true);
+              self.enable('step_into', true);
+              self.enable('toggle_breakpoint', true);
+              self.enable('clear_all_breakpoints', true);
+              self.enable('continue', true);
             }
             else if (res.data.status === 'NotConnected') {
               Alertify.alert(
@@ -736,14 +841,20 @@ define(
       },
 
       clear_all_breakpoint: function(trans_id) {
-        var self = this;
-
-        var br_list = self.GetBreakpointInformation(trans_id);
+        var self = this,
+          br_list = self.GetBreakpointInformation(trans_id);
 
         // If there is no break point to clear then we should return from here.
         if ((br_list.length == 1) && (br_list[0].linenumber == -1))
           return;
 
+        self.enable('stop', false);
+        self.enable('step_over', false);
+        self.enable('step_into', false);
+        self.enable('toggle_breakpoint', false);
+        self.enable('clear_all_breakpoints', false);
+        self.enable('continue', false);
+
         var breakpoint_list = new Array();
 
         for (i = 0; i < br_list.length; i++) {
@@ -771,6 +882,12 @@ define(
                 }
               }
             }
+          self.enable('stop', true);
+          self.enable('step_over', true);
+          self.enable('step_into', true);
+          self.enable('toggle_breakpoint', true);
+          self.enable('clear_all_breakpoints', true);
+          self.enable('continue', true);
           },
           error: function(e) {
             Alertify.alert(
@@ -1204,6 +1321,8 @@ define(
       this.first_time_indirect_debug = false;
       this.direct_execution_completed = false;
       this.polling_timeout_idle = false;
+      this.debug_restarted = false;
+      this.is_polling_required = true; // Flag to stop unwanted ajax calls
 
       var docker = this.docker = new wcDocker(
           '#container', {


view thread (21+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: PATCH: To fix the issue in Debugger module (pgAdmin4)
  In-Reply-To: <CAKKotZR1fL-ykdL0o9FuVVKe_YAwESbvVBpZKYZMAxukp50z3w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox