NRE remote debugging

NRE remote debugging

With the NRE, you can debug the running app using the Devices inspect function of the Chrome and Edge browsers. It supported in Windows and macOS operating systems.

Developed scripts and JavaScript libraries can be debugged. It does not support modules installed with DeviceAdaptors or engine internal code debugging.

The Android OS NRE uses the WebView debugging feature. Please refer to the document below.

https://developer.android.com/reference/android/webkit/WebView#setWebContentsDebuggingEnabled(boolean)

Project settings

Change the enableinspector property value of Environment to true.

Run settings

Windows

Add the -RPP option to the nexacro.exe execution option as shown below and run it.

nexacro.exe -K "INSPECTOR_TEST" -S "http://localhost:8080/start.json" -RPP 127.0.0.1:9223
nexacro.exe -K "INSPECTOR_TEST" -S "http://localhost:8080/start.json" -RPP 9223

If only PORT is set when setting the RPP option, it operates as the localhost.

macOS

When running in the terminal, add the -RPP option as shown below and execute.

open nexaApp.app --args -K INSPECTOR_TEST -S http://localhost:8080/start_macos.json -RPP "127.0.0.1:9223"
open nexaApp.app --args -K INSPECTOR_TEST -S http://localhost:8080/start_macos.json -RPP "9223"

If only PORT is set when setting the RPP option, it operates as the localhost.

Run the Devices inspect feature

1

Launch the Chrome browser and enter "chrome://inspect" in the address bar.

chrome://inspect

2

Click the Configure button to open the Target discovery settings window.

If the Discover network targets is not checked, check it.

3

Input the RPP address value set earlier to the Target discovery settings window.

4

Run the app, and the key value of the launched app is displayed in the Remote Target item.

5

Click the inspect URL under the Target item to be redirected to the console window where you can view the results of the trace method execution or error messages.

6

Click the open dedicated devtools for node URL to open a window for exploring the server resources.

In the [Sources > Node] tab, you can select the desired file, add breakpoints, or perform additional debugging tasks.

If the app is not visible in Remote Target

If the app is not displayed for more than 20 seconds after launching, take the following measures.

1

Close the browser and reestablish the connection.

2

Check that the inspect feature is running properly in the app.

After running the app, accessing the following URL in your browser should display the information. If there is no response, there may be a problem with your project settings or other issues.

[Target discovery settings RPP Address]/json/list
http://127.0.0.1:9223/json/list

Option settings for Pause While Loading feature

Because NRE remote debugging connects to the running app and executes debugging, it is not possible to debug errors or issues that occur during loading. A setting to forcibly pause during loading can be added through the additional options as follows.

The pause while loading feature pauses upon the completion of receiving the theme file (theme.map.js), then waits for the Devices inspect connection. Depending on the project loading method or network conditions, some files may not be downloaded at this time, and the files not downloaded cannot be debugged.

Windows, macOS

Add the -brk "true" option to the nexacro.exe execution option as shown below and execute it.

nexacro.exe -K "INSPECTOR_TEST" -S "http://localhost:8080/start.json" -RPP 127.0.0.1:9223 -brk "true"
nexacro.exe -K "INSPECTOR_TEST" -S "http://localhost:8080/start.json" -RPP 9223 -brk "true"

macOS

When running in the terminal, add the -brk "true" option as shown below and execute.

open nexaApp.app --args -K INSPECTOR_TEST -S http://localhost:8080/start_macos.json -RPP "127.0.0.1:9223" -brk "true"
open nexaApp.app --args -K INSPECTOR_TEST -S http://localhost:8080/start_macos.json -RPP "9223" -brk "true"