-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Debugger.pause() and Debugger.isExecuting() methods. #153
Conversation
@@ -87,9 +90,11 @@ public Debugger getDebugger() { | |||
* </ul> | |||
* | |||
* @since 0.9 | |||
* @deprecated Continue is by default, this method is not necessary. | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is necessary to deprecate this method. I know continue is the default action, but having the method allows people to "change their mind". It keeps some symmetry and also advertises that debugger can "continue".
I suggest to integrate the change without this deprecation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you have just a single event handler callback to "change your mind", thus I considered this method unnecessary.
But O.K. if you'd like to keep it, I'll change the code accordingly.
350d4ba
to
957abaf
Compare
…vent is disposable.
957abaf
to
a7cdfd4
Compare
I've updated the pull request and addressed @jtulach comments. |
I am OK with this change from an API and test perspective. |
|
|
|
…tely-test to master * commit 'af32b3ff953bbe8b176bf37385fe62ec8e883371': Make SLTestSuite more flexible
Debugger.pause() is there already, but is replaced with DebuggerSession.suspendNextExecution(). |
ExecutionEvent
is made disposable. When outside of event handler process, all it's methods should throwIllegalStateException
, according to javadoc. Also, I've deprecatedprepareContinue()
method, since continue is by default.To add a "pause" functionality (which could be achieved by calling
ExecutionEvent.prepareStepInto()
any time during language execution, but this is not possible any more),Debugger.pause()
method is introduced. Also,Debugger.isExecuting()
is added so that we can test whether we can expect thatpause()
will actually pause anything.Test is included.