Conversation
- Basic flow to handle breakpoint and condition.
| return AdapterUtils.createAsyncErrorResponse(response, ErrorCode.EMPTY_DEBUG_SESSION, "Empty debug session."); | ||
| } | ||
|
|
||
| if (!registered) { |
There was a problem hiding this comment.
Should synchronize the register behavior.
There was a problem hiding this comment.
Should register behavior happen on the initialization?
There was a problem hiding this comment.
on initialization, the debug session is not ready, always null in initialize method
There was a problem hiding this comment.
There is a initialize member of IDebugRequestHandler to handle the initialization. This logic should be there.
| ThreadReference bpThread = ((BreakpointEvent) event).thread(); | ||
| IEvaluationProvider engine = context.getProvider(IEvaluationProvider.class); | ||
| if (engine.isInEvaluation(bpThread)) { | ||
| return; |
There was a problem hiding this comment.
If early return, what is the expected value of debugEvent.shouldResume?
There was a problem hiding this comment.
shouldResume is default true, that is expected.
| return AdapterUtils.createAsyncErrorResponse(response, ErrorCode.EMPTY_DEBUG_SESSION, "Empty debug session."); | ||
| } | ||
|
|
||
| if (!registered) { |
There was a problem hiding this comment.
There is a initialize member of IDebugRequestHandler to handle the initialization. This logic should be there.
| IDebugSession debugSession = context.getDebugSession(); | ||
| if (debugSession != null) { | ||
| debugSession.getEventHub().events().subscribe(debugEvent -> { | ||
| if (!(debugEvent.event instanceof BreakpointEvent)) { |
There was a problem hiding this comment.
use observable.filter to only process BreakpointEvent.