8000 PR1 of conditional BP by andxu · Pull Request #153 · microsoft/java-debug · GitHub
[go: up one dir, main page]

Skip to content

PR1 of conditional BP#153

Merged
andxu merged 3 commits intomasterfrom
andy_dev4
Mar 12, 2018
Merged

PR1 of conditional BP#153
andxu merged 3 commits intomasterfrom
andy_dev4

Conversation

@andxu
Copy link
Contributor
@andxu andxu commented Mar 9, 2018
  1. Basic flow to handle breakpoint and condition.

return AdapterUtils.createAsyncErrorResponse(response, ErrorCode.EMPTY_DEBUG_SESSION, "Empty debug session.");
}

if (!registered) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should synchronize the register behavior.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should register behavior happen on the initialization?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on initialization, the debug session is not ready, always null in initialize method

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If early return, what is the expected value of debugEvent.shouldResume?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldResume is default true, that is expected.

Copy link
Contributor
@yaohaizh yaohaizh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments

@andxu andxu merged commit 075fbff into master Mar 12, 2018
return AdapterUtils.createAsyncErrorResponse(response, ErrorCode.EMPTY_DEBUG_SESSION, "Empty debug session.");
}

if (!registered) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use observable.filter to only process BreakpointEvent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in PR2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0