Skip to content

Find stack frames of collapsed threads in the Debug view - #3098

Merged
SougandhS merged 1 commit into
eclipse-platform:masterfrom
r-mennig:debug-find-expand-collapsed-threads
Dec 3, 2026
Merged

SougandhS merged 1 commit into
eclipse-platform:masterfrom
r-mennig:debug-find-expand-collapsed-threads

Conversation

@r-mennig

@r-mennig r-mennig commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3097

What it does

The Debug view's Find (Ctrl+F) now also searches collapsed elements, down to a depth that covers stack frames. What's expanded in the Debug view stays as it is while searching. When you pick an element in the Find dialog, its ancestors are expanded and the element is selected and scrolled into view. Find in the Variables and Breakpoints views behaves as before, except that the picked element is now scrolled into view as well.

Technical concept

VirtualFindAction already searches a hidden VirtualTreeModelViewer. It now takes an auto-expand level for that viewer; the Debug view passes 10. The depth is limited because debug models can be infinitely deep, for example JDT's Show Monitors with deadlocked threads (thread → monitor → owning thread → …).

How to test

  1. Debug a Java application with several threads that stop at a breakpoint.
  2. Collapse all threads in the Debug view except one.
  3. Press Ctrl+F in the Debug view and type a method that is only on the stack of a collapsed thread.
  4. Check that the frame is listed. Select it, and check that its thread expands and the frame is selected and visible.
  5. Enable Java → Show Monitors, run two threads into a deadlock, and press Ctrl+F. Check that the dialog opens and doesn't keep loading.

🤖 Generated with Claude Code

@r-mennig
r-mennig force-pushed the debug-find-expand-collapsed-threads branch from 9475f40 to c450aba Compare December 2, 2026 12:49
Find (Ctrl+F) in the Debug view only searched elements expanded in the
view, so stack frames of collapsed suspended threads were not found and
had to be expanded by hand first.

The Debug view's Find now also searches collapsed elements down to a
fixed depth, which covers the stack frames. The view's own expansion
is left alone; only when an element is picked are its ancestors
expanded, and the element is selected and revealed.

The search runs on the hidden virtual viewer, which now auto-expands to
the given level. The depth is limited because debug models can be
infinitely deep, e.g. JDT's monitor chain of deadlocked threads.

Fixes eclipse-platform#3097

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@r-mennig
r-mennig force-pushed the debug-find-expand-collapsed-threads branch from c450aba to a14511d Compare December 2, 2026 12:50
@r-mennig
r-mennig marked this pull request as ready for review December 2, 2026 12:50
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   39m 56s ⏱️ + 2m 6s
 5 029 tests ±0   5 007 ✅ +1   22 💤 ±0  0 ❌ ±0 
12 978 runs  ±0  12 824 ✅ +1  154 💤 ±0  0 ❌ ±0 

Results for commit a14511d. ± Comparison against base commit a399aac.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the changes enabling Find to search collapsed Debug threads.

No open issues 🎉

What changed in this PR

Addresses #3097 by letting Debug view Find search collapsed threads for stack frames without changing the visible tree’s expansion state during searching.

Changes:

  • Searches the hidden Debug tree to a bounded depth of 10.
  • Expands ancestors and scrolls to the selected result.
  • Updates completion tracking and progress reporting for automatic expansion.
File Description
debug/​org.eclipse.debug.ui/​ui/​org/​eclipse/​debug/​internal/​ui/​views/​launch/​LaunchView.java Enables bounded searching of collapsed Debug elements.
debug/​org.eclipse.debug.ui/​ui/​org/​eclipse/​debug/​internal/​ui/​viewers/​model/​VirtualFindAction.java Adds configurable search depth, updates progress handling, and reveals selected results.

Review effort: Balanced

@SougandhS SougandhS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well !

@SougandhS
SougandhS merged commit 68420ce into eclipse-platform:master Dec 3, 2026
20 of 22 checks passed
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.

Find (Ctrl+F) in the Debug view doesn't find stack frames of collapsed threads

3 participants