void (@NotNull XDebugSession session, DataContext dataContext) { getTextToEvaluate(dataContext, session) .onSuccess(text -> { if (text == null) return; UIUtil.invokeLaterIfNeeded(() -> { XDebugSessionTab tab = ((XDebugSessionImpl)session).getSessionTab(); if (tab != null) { ((XWatchesViewImpl)tab.getWatchesView()).addWatchExpression(XExpressionImpl.fromText(text), -1, true, true); } }); }); }