- Build everything:
gradlew.bat build gradlew.bat :agent:agentJar gradlew.bat :sample:jar - Run the sample app:
gradlew.bat :sample:jarthen launch the JAR - Run Bytesight:
gradlew.bat :composeApp:run - Attach to the sample app process from the Bytesight connection screen
- Click the Heap tab in the sidebar
- Click Capture Snapshot
- Expected: A table of class names appears with columns: Class, Instance Count, Total Size
- Verify: You should see
com.bugdigger.sample.models.User(8+ instances),com.bugdigger.sample.models.Product(12+ instances),com.bugdigger.sample.services.HeapDemoData$LinkedNode(51 instances),com.bugdigger.sample.services.HeapDemoData$TreeNode(31+ instances),com.bugdigger.sample.services.HeapDemoData$Container(4 instances) - Also verify
java.lang.Stringshows a high instance count
- Click column headers to sort by count or size
- Type a class name fragment in the filter field (e.g.,
LinkedNode) - Expected: Only matching rows appear
- Click on
HeapDemoData$LinkedNoderow - Expected: Instance list pane opens showing 51 instances with address, shallow size
- Click on an instance from the list
- Expected: Object graph pane shows fields:
index(int),label(String),next(LinkedNode reference or null) - Click on the
nextfield reference to navigate deeper into the linked list chain - Verify: The graph expands showing the next node's fields
- Long-press on a histogram row (e.g.,
User) - Expected: Context menu appears with "Open in Inspector"
- Click it
- Expected: App navigates to Inspector tab with that class auto-selected in the class list
- Switch to the Search tab
- Enter
hello worldin the search field and click Search - Expected: Results show instances of
java.lang.Stringcontaining "hello world" (at least 5 from HeapDemoData) - Click on a class name in the results
- Expected: Navigates to Inspector for that class
- Search for
HIGHLY_DUPLICATED_CONFIG_KEY - Expected: ~20 String instances found
- Search for
/api/v1/users - Expected: ~12 String instances found
- Search for
shared-leaf - Expected: At least 1 String instance (from Container metadata)
- Search for
alice— should find String instances from User email/username fields - Search for
Wireless Mouse— should find String from Product name
- Switch to the Duplicates tab
- Click Find Duplicates
- Expected: Table shows groups of strings with identical content, sorted by wasted bytes (count × size)
- Verify these appear:
HIGHLY_DUPLICATED_CONFIG_KEY— 20 copies/api/v1/users— 12 copieshello world— 5 copieserror: connection refused— 5 copiesnull pointer exception— 5 copiesbytesight— 5 copiessample application— 5 copiesduplicate value— 5 copies
- Click Inspect String button in a duplicates row header
- Expected: Navigates to Inspector tab with
java.lang.Stringselected
- From Histogram, find
HeapDemoData$TreeNodeand list instances - Select an instance, view object graph
- Expected: Fields include
name(String),value(int),left(TreeNode or null),right(TreeNode or null) - Expanding left/right references shows the tree structure
- Find
HeapDemoData$Container, list instances - Select the
rootcontainer (metadata hastype=root) - Expected:
childrenlist shows 2 Container references (child-A, child-B) - Navigate into child-A → its
children→ shared-node - Navigate into child-B → its
children→ shared-node - Verify: Both reference the same object (same address)
- When viewing instances of any class, click the Inspect button in the instance pane header
- Expected: Navigates to Inspector for that class
- Open the Heap tab
- Verify: The "Heap" title text is clearly visible (white/light text on dark background)
- Previously it was black and invisible against the dark theme
- Empty search: Enter empty string in Search, click Search — should show error or no results
- No snapshot: Try switching to Search/Duplicates without capturing a snapshot first — verify graceful handling
- Re-snapshot: Capture a second snapshot — verify data refreshes
- Large class: Click on
java.lang.Stringin histogram — may have thousands of instances; verify UI remains responsive