언어 설정

Menu
Sites
Language
cannot see console.log

Hi

When i run as tizen web Application mode I get this meesage in the console debug window

The web console logging API (console.log, console.info, console.warn, console.error) has been disabled.
To activate it, you should launch project with Debug mode.

Then i right click my web app project and select Debug As Tizen web App

i get an error message box

Cannot launch application with GDBServer.
The application (63AW5BxMWn) is not running on emulator-26101

The console has this value

setDebugConfigAttributes> isIme? false
[Running the application with GDBServer...]
GNU gdbserver (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "i386-linux-gnueabi"
0

 

I can see the console.log inside the web inspector

is that a correct behaviour ?

Thanks

joe

 

 

Responses

3 댓글
Iqbal Hossain

Debugging a Web application enables you to understand its flow of control. You can debug a Web application by running it on the target device and debugging its JavaScript code. JavaScript code debugging uses the Web Inspector tool.

To debug your application on the target device:

  1. Connect the target device to your computer.
  2. Open the Debug Configurations window by doing one of the following:
    • In the Project Explorer view, right-click the project and select Debug As > Debug Configurations.
    • In the Tizen IDE menu, go to Run > Debug Configurations.
  3. In the Debug Configurations window, click New Launch Configuration.

    If you have not made any changes to the application source files since the last time the application was run, Rapid Development Support (RDS) is used to skip the package upload and make running the application faster. RDS is enabled as default. To disable it, go to Window > Preferences > Tizen SDK > Rapid Development Support.

  4. Set the timeout using the Timeout value slider.

    The timeout value represents the waiting time for the application launch operation. If you are using a lower configuration system, set a higher timeout value to avoid application launch failure errors.

  5. Start the debugging by clicking Debug.

    If no changes are required in the debug configuration, you can also debug the application on the target device by doing one of the following:

    • In the Project Explorer view, right-click the project and select Debug As > Tizen Web application.
    • In the Tizen IDE menu, go to Run > Debug As > Tizen Web application.
    • On the Tizen IDE toolbar, click Debug.

    The Web Inspector tool is displayed in a new Chrome browser window. You can perform the following debugging tasks using the Web Inspector:

    • Inspect styles
    • Inspect the DOM
    • Inspect resources
    • Debug JavaScript code
    Note:

    The Web Inspector always opens in a new window. Life-cycle synchronization between the application to be debugged and the Web Inspector browser is not supported.

    Installing Google Chrome on the device is mandatory for the Web Inspector to work. When Google Chrome is installed on the device, the Tizen SDK automatically detects it. To select the browser path, go to Window > Preferences > Tizen SDK > Web > Chrome.

  6. To debug the JavaScript code, click Sources in the Web Inspector menu.

    You must enable debugging before debugging JavaScript code.

  7. You can also set a break point in the code by right-clicking in the marker bar area on the left side of the editor, and selecting Toggle Breakpoint.

    Once the break points are set, you can watch variables, expressions, and the current call stack. You can also control the debugging by using the following control buttons.

    Table: Control buttons for debugging between break points

    Button Description
    Resume Resumes the current execution.
    Step over Steps over the highlighted statement.

    Executes the current line, and if the line contains a method, executes the method without entering it.

    Step in Steps into the highlighted statement.

    Executes the current line, and if the line contains a method, steps into the method.

    Step out Steps out of the current method.
    Deactivate all break points Deactivates all break points.

If the Web application successfully launches on the target device, the JavaScript Log Console View is automatically launched in the Tizen IDE. The JavaScript Log Console view displays Web application JavaScript logs.

The JavaScript Log Console view provides a functionality to view Web application JavaScript logs.

The following table shows the methods supported for logging to the JavaScript log.

Table: Supported JavaScript log methods

Method Example
console.log console.log("console.log");
console.info console.info("console.info");
console.warn console.warn("console.warn");
console.error console.error("console.error");
console.debug console.debug("console.debug");

The JavaScript log methods are shown in the IDE with colors.

Figure: JavaScript log method colors

JavaScript log method colors

The JavaScript Log Console view is automatically opened when a Web application is launched.

Note: If no target is connected, a notification dialog appears at the right-bottom section of the IDE and the JavaScript Log Console view is not launched.

 

Reference: https://developer.tizen.org/ko/development/getting-started/web-application/application-development-process/running-and-debugging-applications?langredirect=1

 

 

 

joe tiger

Hi

I still have no check with real device - I check with Emulator ?

All devices samsung can be used for Tizen Application or I need to order a suitable device ?

in this case which one are you recommended ?

Thanks

Joe

 

Iqbal Hossain

Did it work on your Emulator ? It worked on my emulator. 

And for Device, you can buy the latest model of Tizen. As per i know Samsung Z3 is the latest and Z2 is coming. Another old version is Z1.