Feat: Add explicit debugging API #343
Open
AnnaSasDev wants to merge 16 commits into
Open
Conversation
- 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.
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.
… consistent equality checks
- Replaced `SetBrowserControlInitParameters` with `SetRemoteDebuggingPort` for improved clarity and modularity. - Updated examples and test utilities to use the new centralized debug configuration API.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Affected Modules / Scope
Changes Introduced
Related Issues
Closes #292
Checklist
📖 Additional Context