Sat, 03 Sep 2016 18:42:02 +0200
Did some cleanup in the modernized debugger code.
DebugClients/Python2/DebugClientBase.py | file | annotate | diff | comparison | revisions | |
DebugClients/Python3/DebugClientBase.py | file | annotate | diff | comparison | revisions | |
Debugger/DebugProtocol.py | file | annotate | diff | comparison | revisions | |
Documentation/Source/eric6.Debugger.DebugProtocol.html | file | annotate | diff | comparison | revisions | |
eric6.e4p | file | annotate | diff | comparison | revisions |
--- a/DebugClients/Python2/DebugClientBase.py Sat Sep 03 18:24:50 2016 +0200 +++ b/DebugClients/Python2/DebugClientBase.py Sat Sep 03 18:42:02 2016 +0200 @@ -149,27 +149,11 @@ Class implementing the client side of the debugger. It provides access to the Python interpeter from a debugger running in - another process whether or not the Qt event loop is running. - - The protocol between the debugger and the client assumes that there will be - a single source of debugger commands and a single source of Python - statements. Commands and statement are always exactly one line and may be - interspersed. - - The protocol is as follows. First the client opens a connection to the - debugger and then sends a series of one line commands. A command is either - >Load<, >Step<, >StepInto<, ... or a Python statement. - See DebugProtocol.py for a listing of valid protocol tokens. - - A Python statement consists of the statement to execute, followed (in a - separate line) by >OK?<. If the statement was incomplete then the - response is >Continue<. If there was an exception then the response - is >Exception<. Otherwise the response is >OK<. The reason - for the >OK?< part is to provide a sentinal (ie. the responding - >OK<) after any possible output as a result of executing the command. - - The client may send any other lines at any other time which should be - interpreted as program output. + another process. + + The protocol between the debugger and the client is based on JSONRPC 2.0 + PDUs. Each one is sent on a single line, i.e. commands or responses are + separated by a linefeed character. If the debugger closes the session there is no response from the client. The client may close the session at any time as a result of the script @@ -217,7 +201,6 @@ self._fncache = {} self.dircache = [] - self.mainProcStr = None # used for the passive mode self.passive = False # used to indicate the passive mode self.running = None self.test = None
--- a/DebugClients/Python3/DebugClientBase.py Sat Sep 03 18:24:50 2016 +0200 +++ b/DebugClients/Python3/DebugClientBase.py Sat Sep 03 18:42:02 2016 +0200 @@ -122,27 +122,11 @@ Class implementing the client side of the debugger. It provides access to the Python interpeter from a debugger running in - another process whether or not the Qt event loop is running. - - The protocol between the debugger and the client assumes that there will be - a single source of debugger commands and a single source of Python - statements. Commands and statement are always exactly one line and may be - interspersed. - - The protocol is as follows. First the client opens a connection to the - debugger and then sends a series of one line commands. A command is either - >Load<, >Step<, >StepInto<, ... or a Python statement. - See DebugProtocol.py for a listing of valid protocol tokens. - - A Python statement consists of the statement to execute, followed (in a - separate line) by >OK?<. If the statement was incomplete then the - response is >Continue<. If there was an exception then the response - is >Exception<. Otherwise the response is >OK<. The reason - for the >OK?< part is to provide a sentinal (ie. the responding - >OK<) after any possible output as a result of executing the command. - - The client may send any other lines at any other time which should be - interpreted as program output. + another process. + + The protocol between the debugger and the client is based on JSONRPC 2.0 + PDUs. Each one is sent on a single line, i.e. commands or responses are + separated by a linefeed character. If the debugger closes the session there is no response from the client. The client may close the session at any time as a result of the script @@ -190,7 +174,6 @@ self._fncache = {} self.dircache = [] - self.mainProcStr = None # used for the passive mode self.passive = False # used to indicate the passive mode self.running = None self.test = None
--- a/Debugger/DebugProtocol.py Sat Sep 03 18:24:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2007 - 2016 Detlev Offenbach <detlev@die-offenbachs.de> -# - -""" -Module defining the debug protocol tokens. -""" - -from __future__ import unicode_literals - -# The protocol "words". -RequestOK = '>OK?<' -RequestEnv = '>Environment<' -RequestCapabilities = '>Capabilities<' -RequestLoad = '>Load<' -RequestRun = '>Run<' -RequestCoverage = '>Coverage<' -RequestProfile = '>Profile<' -RequestContinue = '>Continue<' -RequestStep = '>Step<' -RequestStepOver = '>StepOver<' -RequestStepOut = '>StepOut<' -RequestStepQuit = '>StepQuit<' -RequestBreak = '>Break<' -RequestBreakEnable = '>EnableBreak<' -RequestBreakIgnore = '>IgnoreBreak<' -RequestWatch = '>Watch<' -RequestWatchEnable = '>EnableWatch<' -RequestWatchIgnore = '>IgnoreWatch<' -RequestVariables = '>Variables<' -RequestVariable = '>Variable<' -RequestSetFilter = '>SetFilter<' -RequestThreadList = '>ThreadList<' -RequestThreadSet = '>ThreadSet<' -RequestEval = '>Eval<' -RequestExec = '>Exec<' -RequestShutdown = '>Shutdown<' -RequestBanner = '>Banner<' -RequestCompletion = '>Completion<' -RequestUTPrepare = '>UTPrepare<' -RequestUTRun = '>UTRun<' -RequestUTStop = '>UTStop<' -RequestForkTo = '>ForkTo<' -RequestForkMode = '>ForkMode<' - -ResponseOK = '>OK<' -ResponseCapabilities = RequestCapabilities -ResponseContinue = '>Continue<' -ResponseException = '>Exception<' -ResponseSyntax = '>SyntaxError<' -ResponseSignal = '>Signal<' -ResponseExit = '>Exit<' -ResponseLine = '>Line<' -ResponseRaw = '>Raw<' -ResponseClearBreak = '>ClearBreak<' -ResponseBPConditionError = '>BPConditionError<' -ResponseClearWatch = '>ClearWatch<' -ResponseWPConditionError = '>WPConditionError<' -ResponseVariables = RequestVariables -ResponseVariable = RequestVariable -ResponseThreadList = RequestThreadList -ResponseThreadSet = RequestThreadSet -ResponseStack = '>CurrentStack<' -ResponseBanner = RequestBanner -ResponseCompletion = RequestCompletion -ResponseUTPrepared = '>UTPrepared<' -ResponseUTStartTest = '>UTStartTest<' -ResponseUTStopTest = '>UTStopTest<' -ResponseUTTestFailed = '>UTTestFailed<' -ResponseUTTestErrored = '>UTTestErrored<' -ResponseUTTestSkipped = '>UTTestSkipped<' -ResponseUTTestFailedExpected = '>UTTestFailedExpected<' -ResponseUTTestSucceededUnexpected = '>UTTestSucceededUnexpected<' -ResponseUTFinished = '>UTFinished<' -ResponseForkTo = RequestForkTo - -PassiveStartup = '>PassiveStartup<' - -RequestCallTrace = '>CallTrace<' -CallTrace = '>CallTrace<' - -EOT = '>EOT<\n'
--- a/Documentation/Source/eric6.Debugger.DebugProtocol.html Sat Sep 03 18:24:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>eric6.Debugger.DebugProtocol</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric6.Debugger.DebugProtocol</h1> -<p> -Module defining the debug protocol tokens. -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>CallTrace</td></tr><tr><td>EOT</td></tr><tr><td>PassiveStartup</td></tr><tr><td>RequestBanner</td></tr><tr><td>RequestBreak</td></tr><tr><td>RequestBreakEnable</td></tr><tr><td>RequestBreakIgnore</td></tr><tr><td>RequestCallTrace</td></tr><tr><td>RequestCapabilities</td></tr><tr><td>RequestCompletion</td></tr><tr><td>RequestContinue</td></tr><tr><td>RequestCoverage</td></tr><tr><td>RequestEnv</td></tr><tr><td>RequestEval</td></tr><tr><td>RequestExec</td></tr><tr><td>RequestForkMode</td></tr><tr><td>RequestForkTo</td></tr><tr><td>RequestLoad</td></tr><tr><td>RequestOK</td></tr><tr><td>RequestProfile</td></tr><tr><td>RequestRun</td></tr><tr><td>RequestSetFilter</td></tr><tr><td>RequestShutdown</td></tr><tr><td>RequestStep</td></tr><tr><td>RequestStepOut</td></tr><tr><td>RequestStepOver</td></tr><tr><td>RequestStepQuit</td></tr><tr><td>RequestThreadList</td></tr><tr><td>RequestThreadSet</td></tr><tr><td>RequestUTPrepare</td></tr><tr><td>RequestUTRun</td></tr><tr><td>RequestUTStop</td></tr><tr><td>RequestVariable</td></tr><tr><td>RequestVariables</td></tr><tr><td>RequestWatch</td></tr><tr><td>RequestWatchEnable</td></tr><tr><td>RequestWatchIgnore</td></tr><tr><td>ResponseBPConditionError</td></tr><tr><td>ResponseBanner</td></tr><tr><td>ResponseCapabilities</td></tr><tr><td>ResponseClearBreak</td></tr><tr><td>ResponseClearWatch</td></tr><tr><td>ResponseCompletion</td></tr><tr><td>ResponseContinue</td></tr><tr><td>ResponseException</td></tr><tr><td>ResponseExit</td></tr><tr><td>ResponseForkTo</td></tr><tr><td>ResponseLine</td></tr><tr><td>ResponseOK</td></tr><tr><td>ResponseRaw</td></tr><tr><td>ResponseSignal</td></tr><tr><td>ResponseStack</td></tr><tr><td>ResponseSyntax</td></tr><tr><td>ResponseThreadList</td></tr><tr><td>ResponseThreadSet</td></tr><tr><td>ResponseUTFinished</td></tr><tr><td>ResponseUTPrepared</td></tr><tr><td>ResponseUTStartTest</td></tr><tr><td>ResponseUTStopTest</td></tr><tr><td>ResponseUTTestErrored</td></tr><tr><td>ResponseUTTestFailed</td></tr><tr><td>ResponseUTTestFailedExpected</td></tr><tr><td>ResponseUTTestSkipped</td></tr><tr><td>ResponseUTTestSucceededUnexpected</td></tr><tr><td>ResponseVariable</td></tr><tr><td>ResponseVariables</td></tr><tr><td>ResponseWPConditionError</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> -<hr /> -</body></html> \ No newline at end of file
--- a/eric6.e4p Sat Sep 03 18:24:50 2016 +0200 +++ b/eric6.e4p Sat Sep 03 18:42:02 2016 +0200 @@ -127,7 +127,6 @@ <Source>Debugger/CallTraceViewer.py</Source> <Source>Debugger/Config.py</Source> <Source>Debugger/DebugClientCapabilities.py</Source> - <Source>Debugger/DebugProtocol.py</Source> <Source>Debugger/DebugServer.py</Source> <Source>Debugger/DebugUI.py</Source> <Source>Debugger/DebugViewer.py</Source>