void (final String expr, final XEvaluationCallback callback, final boolean doTrunc) { ApplicationManager.getApplication().executeOnPooledThread(() -> { String expression = expr.trim(); if (expression.isEmpty()) { callback.evaluated(getNone()); return; } final boolean isExpression = PyDebugSupportUtils.isExpression(myProject, expression); try { // todo: think on getting results from EXEC final PyDebugValue value = myDebugProcess.evaluate(expression, !isExpression, doTrunc); if (value.isErrorOnEval()) { callback.errorOccurred("{" + value.getType() + "}" + value.getValue()); //NON-NLS } else { callback.evaluated(value); } } catch (PyDebuggerException e) { callback.errorOccurred(e.getTracebackError()); } }); }