Skip to content

Conversation

@mobiletoly
Copy link

Title
SlowOperations warning on EDT when rendering DAP stack frames (DAPStackFrame.getSourcePosition uses VFS lookup)

Summary
When debugging with LSP4IJ DAP, the IDE logs a SlowOperations warning because DAPStackFrame.getSourcePosition() performs a synchronous VfsUtil.findFile(...) lookup on the EDT during
frame list rendering. This is triggered by the XDebugger UI and happens even in normal debugging workflows.

Exception

  SEVERE - #c.i.u.SlowOperations - Slow operations are prohibited on EDT
  ...
  at com.intellij.openapi.vfs.VfsUtil.findFile(VfsUtil.java:202)
  at com.redhat.devtools.lsp4ij.dap.client.DAPStackFrame.doGetSourcePosition(DAPStackFrame.java:106)
  at com.redhat.devtools.lsp4ij.dap.client.DAPStackFrame.getSourcePosition(DAPStackFrame.java:84)
  ...

Root cause
DAPStackFrame.doGetSourcePosition() calls VfsUtil.findFile(...) on the EDT when resolving file‑backed stack frames, which triggers SlowOperations warnings.

Fix
I've moved the file lookup off the EDT and cache the result, refreshing the debug views once the source position is resolved. This avoids EDT slow ops while preserving behavior.

Environment

  • IntelliJ IDEA 2024.2.x
  • LSP4IJ plugin
  • Debugging via DAP

With this fix and locally installed plugin - I don't see this exception anymore

@mobiletoly mobiletoly changed the title dap: resolve stack frame source off EDT fix: dap: resolve stack frame source off EDT Jan 16, 2026
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.

1 participant