Skip to content

Add a /bug-memory command that takes a memory snapshot and saves it to disk #25337

@jacob314

Description

@jacob314

Command to export a memory snapshot

This will speed up user's reporting memory issues. Right now users have to connect to chrome devtools and take a snapshot which is higher friction then just typing a command in Gemini CLI.

This could be integrated directly in /bug automatically saving a memory snapshot to disk if memory usage is over 2GB and surfacing the URL to the snapshot to let the user know they can share the snapshot with the bug if they want.

Concerns: taking a snapshot via the V8 API can be slow. We would need to make sure the bug url is shown before we potentially lock their machine for 20 seconds taking the snapshot.
See the existing usage of the Node V8 API to open the debugger. We'd want to open the debugger and then use the V8 API commands to take a snapshot and save to disk. We should ensure we close the debugger after the task is complete and use an available port rather than requiring 9229.

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!

Type

No fields configured for Task.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions