@ApiStatus.Internal
  public void loadState(@NotNull WatchesManagerState state) {
    clearContext();

    for (ConfigurationState configurationState : state.getExpressions()) {
      List<WatchState> expressionStates = configurationState.getExpressionStates();
      if (!ContainerUtil.isEmpty(expressionStates)) {
        watches.put(configurationState.getName(), ContainerUtil.mapNotNull(expressionStates, XExpressionState::toXExpression));
      }
    }

    VirtualFileManager fileManager = VirtualFileManager.getInstance();
    XDebuggerUtil debuggerUtil = XDebuggerUtil.getInstance();
    for (InlineWatchState inlineWatchState : state.getInlineExpressionStates()) {
      if (inlineWatchState == null || inlineWatchState.getFileUrl() == null || inlineWatchState.getWatchState() == null) continue;

      VirtualFile file = fileManager.findFileByUrl(inlineWatchState.getFileUrl());
      XSourcePosition position = debuggerUtil.createPosition(file, inlineWatchState.getLine());
      XExpression expression = inlineWatchState.getWatchState().toXExpression();
      if (position == null || expression == null) continue;

      InlineWatch watch = new InlineWatch(expression, position);
      inlineWatches.computeIfAbsent(inlineWatchState.getFileUrl(), (k) -> new HashSet<>()).add(watch);
    }

    // set markers in the background
    ApplicationManager.getApplication().executeOnPooledThread(() -> {
      for (InlineWatch i : ContainerUtil.flatten(inlineWatches.values())) {
        ReadAction.nonBlocking(() -> {
          if (!i.setMarker()) {
            inlineWatches.get(i.getPosition().getFile().getUrl()).remove(i);
          }
        }).executeSynchronously();
      }
    });
  }
@ApiStatus.Internal
  public void loadState(@NotNull WatchesManagerState state)