Skip to content

Fix perf issue when debugging pet clinic with "stopOnEntry" on - #115

Merged
Jinbo Wang (testforstephen) merged 3 commits into
masterfrom
jinbo_bugfix
Nov 24, 2017
Merged

Jinbo Wang (testforstephen) merged 3 commits into
masterfrom
jinbo_bugfix

Conversation

@testforstephen

Copy link
Copy Markdown
Contributor

Signed-off-by: Jinbo Wang [email protected]

fix bug: 100% CPU when debugging sprint boot pet clinic with "stopOnEntry" on (microsoft/vscode-java-debug#145).

The root cause: previous implementation doesn't clean up the methodEntryRequest when the stopOnEntry is hit. The later program always do string compare to filter if it's the main method. This is the reason why stopOnEntry slow down the debuggee program.

Method method = ((MethodEntryEvent) debugEvent.event).method();
if (method.isPublic() && method.isStatic() && method.name().equals("main")
&& method.signature().equals("([Ljava/lang/String;)V")) {
debugSession.getVM().eventRequestManager().deleteEventRequest(request);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add vmdisconnected exception handle on deleteEventRequest

@testforstephen
Jinbo Wang (testforstephen) deleted the jinbo_bugfix branch November 24, 2017 01:53
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.

2 participants