Skip to content

Conversation

@hxrshxz
Copy link

@hxrshxz hxrshxz commented Oct 19, 2025

Fixes #1294

Description

  • Adds ability to gather system diagnostics from a running sketch through the debugger.

@Copilot Copilot AI review requested due to automatic review settings October 19, 2025 11:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a diagnostics gathering feature to the debugger that allows developers to collect system information, memory statistics, and sketch runtime details from a running Processing sketch. The feature is accessible through a new menu item in the Debug menu and displays results in a formatted dialog with export capabilities.

Key Changes:

  • New diagnostics collection system that gathers system properties, memory usage, sketch details, and display information
  • Debug menu integration with "Gather Diagnostics" option that invokes the feature via JDWP
  • Dialog interface for viewing, copying, and exporting diagnostic data

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
DiagnosticsDialog.java New dialog UI for displaying formatted diagnostics with copy/export functionality
Debugger.java Adds menu item and implements remote diagnostics gathering via debugger connection
PDiagnostics.java Core diagnostics collection logic that gathers system, memory, and sketch information
PApplet.java Adds getDiagnostics() public method to enable remote invocation from debugger
PDE.properties Adds localization string for the new menu item

@Stefterv
Copy link
Collaborator

Stefterv commented Oct 21, 2025

Hi @hxrshxz Thank you so much for this work!

A few things:

  • Rather than communicating over JSON and writing a custom writer and parser, lets use the build-in communication in the Debug connection
  • The debug connection is active even when the debugger is not connected in Java mode, so this is not limited to running a sketch with the Debugger active
  • Rather than adding a whole new screen, let's just add it to the clipboard content that already exists when you click the version number

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.

Gathering System Diagnostics from a sketch over the debug connection

2 participants