Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: The timeout in the DbgpDebuggingEngineCommunicator.communicate()

Hi all,

A quote from http://xdebug.org/docs-dbgp.php#packet-communications

The IDE sends a command, then waits for a response from the debugger engine. If the command is not received in a reasonable time (implementation dependent) it may assume the debugger engine has entered a non-responsive state. The exception to this is when the IDE sends a 'continuation' command which may not have an immediate response.

'continuation' commands include, but may not be limited to: run, step_into, step_over, step_out and eval. When the debugger engine receives such a command, it is considered to have entered a 'run state'.

The question is: do we need 2 different timeouts? One for general commands (default value a few minutes) and another for continuation commands (default value a few hours).

Thoughts?

Regards,
Alex


Johan Compagner wrote:
i made it use the preference.


On Thu, Jul 3, 2008 at 2:50 PM, Alex Panchenko <alex@xxxxxxxxx> wrote:
Yes, you are right - if those fields are already in the preferences dialog - the code should be fixed to use them.

Johan Compagner wrote:
i just checked for preferences and there are already preferences specified for that
but never used (as far as i see)

   // Time to wait of connection debugging engine to the IDE
   public static final String PREF_DBGP_CONNECTION_TIMEOUT = "dbgp_connection_timeout"; //$NON-NLS-1$

   // Time to wait after sending DBGP request to the debugging engine
   public static final String PREF_DBGP_RESPONSE_TIMEOUT = "dbgp_response_timeout"; //$NON-NLS-1$

       prefs.setDefault(
               DLTKDebugPreferenceConstants.PREF_DBGP_CONNECTION_TIMEOUT,
               10000);

       prefs.setDefault(
               DLTKDebugPreferenceConstants.PREF_DBGP_RESPONSE_TIMEOUT, 10000);


shouldnt these just be used?

johan



On Thu, Jul 3, 2008 at 2:40 PM, Alex Panchenko <alex@xxxxxxxxx <mailto:alex@xxxxxxxxx>> wrote:

   Hi Johan,


   Johan Compagner wrote:

       i guess the better code would be this:

                  long endTime = 0;
                  if (timeout > 0) {
                      endTime = System.currentTimeMillis() + timeout;
                  }
                  while (!terminated && !map.containsKey(key)) {
                      long current = System.currentTimeMillis();
                      if (endTime != 0 && current >= endTime) {
                          break;
                      }
                      if (endTime == 0)
                          wait();
                      else
                          wait(endTime - current);
                  }

        Then it really waits for ever if timeout == 0
       else it will wait until the endTime which is current time +
       timeout.

   Yes, please commit your code.

       The problem is that this still doesnt fix my problem :)
       Can i make a preference of that timeout? That i can then set
       in my plugin_customization.ini?

   May be we can just increase the timeout to about 1 hour for now? I
   have committed that line.

   Alex
   _______________________________________________
   dltk-dev mailing list
   dltk-dev@xxxxxxxxxxx <mailto:dltk-dev@xxxxxxxxxxx> ------------------------------------------------------------------------


_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev
 
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


_______________________________________________ dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev

Back to the top