Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 4.49 KB

File metadata and controls

80 lines (56 loc) · 4.49 KB

Change Log

All notable changes to the "auto-reattach-for-java-debug" extension will be documented in this file.

The format is based on Keep a Changelog.

[0.1.3] - 2025-10-10

Improved

  • Enhanced JDWP port verification to eliminate server-side warning messages and ensure seamless, error-free reattachments during application restarts. Resolves: "Debugger failed to attach: handshake failed - connection prematurally closed"

[0.1.2] - 2025-10-10

Fixed

  • Multi-project support: Fixed session tracking to properly handle multiple debug sessions with the same launch name across different projects by using unique host:port:launchName identifiers
  • Host normalization: localhost and 127.0.0.1 are now treated as equivalent
  • Session limit protection: Added safety limit of 50 monitored sessions to prevent potential memory leaks
  • Status bar accuracy: Status bar now correctly reflects the aggregate state of all monitored sessions instead of showing "Idle" when other sessions are still active
  • Critical race condition: Fixed issue where status bar would disappear after successful reattachment due to the terminating session's cleanup removing the newly reattached session's state
  • Memory leak: Resolved memory leak where manually stopped sessions in 'attached' state were not being cleaned up properly
  • Status bar state cache bug: Fixed aggregated status bar not updating when sessions transitioned from 'monitoring' to other states

Improved

  • Enhanced logging: Included host:port information in relevant log messages for better troubleshooting
  • Smart status bar:
    • Single session: Shows individual session state (maintains current behavior)
    • Multiple sessions: Shows aggregate view (e.g., "2 sessions, 1 waiting")
    • Tooltip always displays detailed information for all sessions
    • Long configuration names are truncated to prevent UI overflow
  • Debug information: Added preLaunchTask to debug logs to help users understand their configuration
  • Code quality:
    • Centralized session key building logic to eliminate code duplication
    • Standardized parameter order across all session management methods
    • Added detailed explanatory comments to critical sections explaining why certain logic exists (race condition handling, defensive status bar hiding, session key design)

[0.1.1] - 2025-10-09

Performance Improvements

  • Reduced CPU and memory consumption by ~85% during port monitoring
  • Faster port availability detection: Connection timeout reduced from 1s to 200ms for more responsive reattachment
  • Optimized default wait time for JVM restart: Reduced from 30s to 5s. Important: This timeout measures JVM restart time (typically 1-3s), NOT full application startup. JDWP is ready as soon as the JVM process starts, even if your Spring Boot/Micronaut app takes 30+ seconds to fully initialize.
  • Improved resource management: Added proper cleanup for network sockets and timers to prevent resource leaks
  • Better VS Code integration: Extension now releases resources immediately when VS Code closes, instead of blocking shutdown
  • Eliminated redundant config validation: Configuration validation now happens once during cache refresh instead of on every lookup, reducing CPU usage by ~60-70% for configuration operations
  • Faster config lookup: Changed from O(n) array search to O(1) Map lookup for configuration retrieval

Changed

  • Default maxWaitTimeMs changed from 30000ms (30s) to 5000ms (5s) - measures JVM restart, not app startup
  • Maximum allowed maxWaitTimeMs reduced from 300000ms (5min) to 60000ms (1min)
  • Socket connection timeout reduced from 1000ms to 200ms

Documentation

  • Emphasized distinction: maxWaitTimeMs measures JVM restart time, NOT full application startup time
  • Added detailed explanation: JDWP debugging is available immediately when JVM starts, independent of application initialization time
  • Clarified when to increase timeout values (Docker Desktop, DevContainers, slow machines)

[0.1.0] - 2025-10-09

Initial release.

Features

  • Automatically reconnects Java debug sessions when application restarts
  • Supports multiple debug configurations simultaneously
  • Status bar integration showing current state
  • Configurable timeouts and retry intervals
  • Intelligent merging of user and workspace settings
  • Comprehensive logging in Output panel

Limitations

  • Only supports configurations with fixed ports
  • Cannot differentiate manual stop from app restart