Skip to content

Conversation

@baptistegrimaud
Copy link
Contributor

@baptistegrimaud baptistegrimaud commented Jan 27, 2026

Fixes #626.

Description

Following #556, the chromeinspector-<version>.jar library was no longer available but it is required to enable debugging.
Without it, it failed with:

[org.jahia.modules.javascript.modules.engine.jsengine.GraalVMEngine(252)] : The activate method has thrown an exception
java.lang.IllegalArgumentException: Could not find option with name engine.inspect.Secure.
	... suppressed 9 lines
	at org.jahia.modules.javascript.modules.engine.jsengine.GraalVMEngine.activate(GraalVMEngine.java:127) ~[?:?]
	... suppressed 2 lines
	at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
	... suppressed 20 lines
	at java.base/java.lang.Thread.run(Thread.java:840) [?:?]

The important class of that library is https://github.com/oracle/graal/blob/d018a8910cf09bcaade5cbb62e66e317f15c9871/tools/src/com.oracle.truffle.tools.chromeinspector/src/com/oracle/truffle/tools/chromeinspector/instrument/InspectorInstrument.java#L78.

Tip

Documentation to guide the reviews: How to do a code review

cy.waitUntil(
() =>
cy
.exec(`curl -s -o /dev/null -w "%{http_code}" http://${host}:${port}/json/version`, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

a curl command is used within cy.exec() as it's not possible (at least I couldn't have it working) to rely on a cy.request() to check a network error, the Cypress test is always failing

@baptistegrimaud baptistegrimaud marked this pull request as ready for review January 27, 2026 08:11
@baptistegrimaud baptistegrimaud requested a review from a team as a code owner January 27, 2026 08:11
Copilot AI review requested due to automatic review settings January 27, 2026 08:11
Copy link
Contributor

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 the required chromeinspector library to enable debugging functionality in the GraalVM engine. The library was previously removed but is necessary for the inspector instrument to work properly.

Changes:

  • Added chromeinspector dependency to both parent and engine module POMs
  • Added comprehensive test coverage for enabling the GraalVM debugger on different ports
  • Added support for testing the debugger on an additional port (10229)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Added chromeinspector dependency declaration in parent POM
javascript-modules-engine/pom.xml Added chromeinspector dependency and embedded it in the OSGi bundle
tests/docker-compose.yml Exposed additional port 10229 for debugger testing
tests/cypress/fixtures/graphql/enableGraalVMDebugger.graphql Added GraphQL mutation for configuring GraalVM debugger settings
tests/cypress/e2e/engine/graalvmEngineTest.cy.ts Added comprehensive test suite for GraalVM debugger functionality

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

@baptistegrimaud baptistegrimaud marked this pull request as draft January 27, 2026 08:53
@baptistegrimaud baptistegrimaud marked this pull request as ready for review January 27, 2026 09:16
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.

Unable to enable GraalVM debugging

2 participants