[
https://issues.apache.org/jira/browse/NETBEANS-2028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16756323#comment-16756323
]
Jaroslav Tulach commented on NETBEANS-2028:
-------------------------------------------
I have modified the code in the evaluate method to start a self-sampler
[^DebuggerGenerateSample.diff] and with help of that I managed to get the
profiled snapshot of the problem [^Debugger43sForASingleSteop.npss] - it seems
that the problem is in calling into {{JavaSource}} infrastructure that takes
long time to find an answer. CCing [~jlahoda]
Please consider to not block regular operations when evaluating expressions.
> 45s: single step my take so long
> --------------------------------
>
> Key: NETBEANS-2028
> URL: https://issues.apache.org/jira/browse/NETBEANS-2028
> Project: NetBeans
> Issue Type: Bug
> Components: debugger - Java
> Affects Versions: 10.0
> Reporter: Jaroslav Tulach
> Assignee: Martin Entlicher
> Priority: Major
> Attachments: Debugger43sForASingleSteop.npss,
> DebuggerGenerateSample.diff
>
>
> I have problems with debugger when I debug NetBeans based applications.
> Sometimes it just takes sooooo loooong to make a single step over. After some
> analysis it turned out that the whole slowdown is caused by evaluation of
> variables. When I modify the code to:
> {code:java}
> diff --git
> a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java
>
> b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java
> index 0444242..933065c 100644
> ---
> a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java
> +++
> b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java
> @@ -345,7 +347,7 @@ public class JPDADebuggerImpl extends JPDADebugger {
> */
> public Variable evaluate (String expression, CallStackFrame csf,
> ObjectVariable var)
> throws InvalidExpressionException {
> - return evaluateGeneric(new EvaluatorExpression(expression), csf,
> var);
> + throw new InvalidExpressionException("skipping: " + expression);
> }
> {code}
> then the debugger starts to behave normally - it it can step in, over and out
> without any issues.
>
> The next question is what is happening in the {{evaluateGeneric}} that takes
> so long?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists