Skip to content

Feat: Add explicit debugging API #343

Open
AnnaSasDev wants to merge 16 commits into
corefrom
292-feature-javascript-debugging
Open

Feat: Add explicit debugging API #343
AnnaSasDev wants to merge 16 commits into
corefrom
292-feature-javascript-debugging

Conversation

@AnnaSasDev
Copy link
Copy Markdown
Member

Summary

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature impacting existing APIs)
  • Refactor / Code cleanup (no functional change)
  • Documentation update
  • Test addition or update
  • Other (please describe):

Affected Modules / Scope

  • InfiniFrame
  • InfiniFrame.Blazor
  • InfiniFrame.BlazorWebView
  • InfiniFrame.Js
  • InfiniFrame.Native
  • InfiniFrame.Shared
  • InfiniFrame.WebServer
  • InfiniFrame.Tools.Pack
  • InfiniFrameExample
  • InfiniFrameTests
  • Other:

Changes Introduced

Related Issues

Closes #292

Checklist

  • My code follows InfiniFrame's coding conventions
  • I added comments for complex or non-obvious code
  • Documentation updated (if applicable)
  • All tests pass locally
  • Added new tests for any new functionality
  • Existing tests pass
  • No new warnings or errors introduced
  • PR only includes changes relevant to the issue / feature

📖 Additional Context

- Introduced `SetRemoteDebuggingPort` builder API for Windows with validation (`1..65535`, `0/null` disables), platform checks, and deterministic port assignment.
- Updated `TryGetRemoteDebuggingEndpoint` to retrieve the loopback endpoint when remote debugging is enabled.
- Documented new API in `web-server.md` and migration guides.
- Enhanced native initialization to honor the explicit remote debugging configuration.
- Added comprehensive unit tests for builder, runtime behavior, unsupported platform exceptions, and port collisions.
@AnnaSasDev AnnaSasDev linked an issue Jun 4, 2026 that may be closed by this pull request
2 tasks
- Remote debugging now supported on both Windows and Linux platforms.
- Updated documentation to reflect platform changes in web-server and migration guides.
- Enhanced native initialization for WebKitGTK to configure remote debugging.
- Added Linux unit test for `RemoteDebuggingPort`.
- Updated migration guides for Linux-specific WebKitGTK behavior and limitations.
- Introduced `SetWebInspectorEnabled` API for macOS (13.3+) to enable Safari Web Inspector attachability.
- Updated native implementation to handle runtime validation and conditional enabling of Web Inspector.
- Added unit tests for builder configuration (`Builder_Enable_ShouldFollowPlatformSupport`) and native parameters marshalling.
- Enhanced documentation across guides, migration notes, and API references for Web Inspector configuration.
- Improved platform-specific behavior, throwing `PlatformNotSupportedException` for unsupported OS versions.
- Refactored marshaller and validation logic to include `WebInspectorEnabled` field in native parameters.
- Introduced `DebugEventHandler` for platform-capable runtime diagnostics.
- Enhanced macOS and Windows navigation with debug events for success/failure/error tracking.
- Added `TryProbeEndpoint` API to test remote debugging endpoint availability deterministically.
- Refined WebView lifecycle to handle closing state and pending messages consistently across platforms.
- Updated documentation, tests, and migration guides to reflect API and lifecycle enhancements.
- Extracted debug-related classes and interfaces into a new `InfiniFrame.Debugging` namespace.
- Introduced `InfiniFrameWindowDebugBuilder` for modular debug configuration with `SetDevToolsEnabled`, `SetWebInspectorEnabled`, and `SetRemoteDebuggingPort` APIs.
- Replaced direct configuration manipulation with centralized debug builder.
- Improved event handling with `DebugEvent` for streamlined diagnostics across platforms.
- Updated tests and documentation to reflect changes in debug lifecycle and API usage.
- Added `InfiniFrameNativeParametersEqualityComparer` for custom comparison logic and centralized equality checks for `InfiniFrameNativeParameters`.
- Simplified `InfiniFrameNativeParameters` by removing inline equality methods and operators.
- Updated unit tests to validate the new equality comparer logic.
- Replaced `SetBrowserControlInitParameters` with `SetRemoteDebuggingPort` for improved clarity and modularity.
- Updated examples and test utilities to use the new centralized debug configuration API.
@AnnaSasDev AnnaSasDev changed the title Feat: Add explicit remote debugging API Feat: Add explicit debugging API Jun 5, 2026
@AnnaSasDev AnnaSasDev self-assigned this Jun 5, 2026
Comment on lines +74 to +77
catch (Exception ex) {
reason = ex.Message;
return false;
}
- Removed duplicate `Debug` fields (`DevToolsEnabled`, `WebInspectorEnabled`, `RemoteDebuggingPort`) from `Configuration` for centralization.
- Introduced `InfiniFrameWindowDebugBuilder` for modular startup debug settings in `InfiniFrameNativeParameters`.
- Transitioned tests and debug logic to leverage centralized debug builder APIs.
- Enhanced platform checks and validation for debugging features.
- Replaced `Debug` API with `Debugging` for clearer and centralized debug configuration.
- Removed `InfiniFrameWindowDebugBuilder` dependency, replacing it with `InfiniFrameWindowDebuggingBuilder`.
- Updated APIs to use fluent methods (`SetDevToolsEnabled`, `SetWebInspectorEnabled`, `SetRemoteDebuggingPort`) with platform validations.
- Adjusted tests, examples, and utilities to align with the new debug architecture.
…c, update WebInspector utility references to `MacOsWebInspectorUtility`.
- Standardize platform checks in `SetRemoteDebuggingPort` and `SetWebInspectorEnabled`.
- Replace nullable ports with explicit `0` checks.
- Add `[SupportedOSPlatform]` attributes for platform-specific APIs.
- Update tests and examples to include platform validation.
- Replace `Center` methods with `Centered` for improved clarity and consistency.
- Introduce `NativeInvokeWithValidation` in `InvokeUtility` for robust, reusable native interop handling.
- Update tests, examples, and extensions to align with new centering and invocation utilities.
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.

Feature | Javascript debugging

2 participants