Skip to content

RDKEMW-18491 : [rdknativescript] add debugger support similar to webkit#134

Merged
vjain008 merged 1 commit into
developfrom
topic/RDKEMW-18491
Jun 9, 2026
Merged

RDKEMW-18491 : [rdknativescript] add debugger support similar to webkit#134
vjain008 merged 1 commit into
developfrom
topic/RDKEMW-18491

Conversation

@gurpreet319

Copy link
Copy Markdown
Contributor

Reason for change: Added debugger support
Test Procedure: build should be successful
Risk: low
Priority: P2

Copilot AI review requested due to automatic review settings June 4, 2026 11:45
@gurpreet319 gurpreet319 requested a review from a team as a code owner June 4, 2026 11:45
Comment thread utils/nativejsinspector.html Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a custom remote inspector implementation for the JSC-based runtime, aiming to provide debugger/inspector support “similar to WebKit” via an HTTP + WebSocket server and a lightweight browser UI.

Changes:

  • Adds a libsoup-based InspectorHTTPServer that serves /json/* endpoints and a /devtools/page/<id> WebSocket for a minimal CDP-like protocol.
  • Adds a standalone inspector frontend (nativejsinspector.html) with Console + Sources views and a “Reload” action.
  • Wires runtime events into the inspector (context registration, script registration, and forwarding console output), and adds a build option to enable the feature.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
utils/nativejsinspector.html New inspector UI (Console/Sources) that connects over WebSocket to the runtime.
src/jsc/JavaScriptUtils.cpp Forwards console.* output to the inspector server when enabled.
src/jsc/JavaScriptEngine.cpp Starts/stops the inspector server based on NATIVEJS_INSPECTOR_SERVER; updates websocket server polling.
src/jsc/JavaScriptContext.cpp Registers/unregisters the top-level JS context with the inspector server and wires reload callback.
src/JavaScriptContextBase.cpp Registers file-based scripts so they appear in the Sources panel.
src/InspectorHTTPServer.cpp New HTTP + WebSocket server implementing minimal CDP-like messages, plus script/context tracking.
include/InspectorHTTPServer.h New public header for the inspector server singleton.
src/jsc/include.cmake Adds inspector sources/defines and libsoup linkage when enabled.
CMakeLists.txt Renames/introduces REMOTE_INSPECTOR_ENABLE option and adjusts linking/include paths for libsoup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/jsc/JavaScriptEngine.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread utils/nativejsinspector.html Outdated
Comment thread utils/nativejsinspector.html Outdated
Comment thread utils/nativejsinspector.html Outdated
Comment thread utils/nativejsinspector.html Outdated
Comment thread CMakeLists.txt Outdated
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI review requested due to automatic review settings June 5, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Comment thread src/jsc/JavaScriptEngine.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread src/InspectorHTTPServer.cpp Outdated
Comment thread utils/nativejsinspector.html Outdated
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/JavaScriptContextBase.cpp
@gurpreet319 gurpreet319 force-pushed the topic/RDKEMW-18491 branch from f842503 to 0f49c41 Compare June 5, 2026 08:53
Comment thread src/jsc/JavaScriptUtils.cpp Fixed
@gurpreet319 gurpreet319 force-pushed the topic/RDKEMW-18491 branch from 0f49c41 to 97013df Compare June 5, 2026 08:55
Copilot AI review requested due to automatic review settings June 5, 2026 09:08
@gurpreet319 gurpreet319 force-pushed the topic/RDKEMW-18491 branch from 97013df to b7b32f3 Compare June 5, 2026 09:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/InspectorHTTPServer.cpp
Comment thread src/jsc/JavaScriptEngine.cpp
Reason for change: Added debugger support
Test Procedure: build should be successful
Risk: low
Priority: P2
@gurpreet319 gurpreet319 force-pushed the topic/RDKEMW-18491 branch from b7b32f3 to ade272b Compare June 5, 2026 10:28
@vjain008 vjain008 merged commit 8e565f2 into develop Jun 9, 2026
8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants