简体   繁体   English

console.log无法在Samsung Tizen TV Emulator(网络应用程序)中运行

[英]console.log not work in Samsung Tizen TV Emulator (web app)

I am trying to debug my web app with Tizen IDE + Emulator, but console does not work. 我正在尝试使用Tizen IDE + Emulator调试我的Web应用程序,但控制台不起作用。 When I run my app with the 'Debug as...' option it launches the app and the inspector opens correctly but the console tab is empty and I cannot run any JavaScript command in the console (as suggested here https://stackoverflow.com/a/37845599/3199735 ). 当我使用'Debug as ...'选项运行我的应用程序时,它启动应用程序并且检查器正确打开但控制台选项卡为空,我无法在控制台中运行任何JavaScript命令(如https:// stackoverflow中所建议的那样) 。 com / a / 37845599/3199735 )。 Console output in the IDE is also empty. IDE中的控制台输出也为空。 I tested this with the Basic TV app template, so there is no JavaScript code which disables console. 我使用Basic TV应用程序模板对此进行了测试,因此没有禁用控制台的JavaScript代码。 I also tested the 'sdb dlog' command, but it just gives me an error. 我还测试了'sdb dlog'命令,但它只是给了我一个错误。

I'm using the latest SDK and IDE. 我正在使用最新的SDK和IDE。

Mac OSX 10.11.6 Tizen SDK Mac OSX 10.11.6 Tizen SDK

Version : 2.4.0_Rev8 版本:2.4.0_Rev8

You can find same posts with screenshots from Samsung's forums 您可以在三星论坛中找到包含屏幕截图的相同帖子

Samsung Tizen TV SDK provides Web Inspector as debugging tool. Samsung Tizen TV SDK提供Web Inspector作为调试工具。 Google chrome is required to be installed to perform such debug Operation. 需要安装Google Chrome才能执行此类调试操作。 You can check the functionalities provided in this document . 您可以查看本文档中提供的功能。

a) Run the tizen project using Debug As-> Tizen Web Application. a)使用Debug As-> Tizen Web Application运行tizen项目。 When you will debug the project on emulator, the Web Inspector (Debugging tool for Tizen SDK) will open in a separate window. 当您在模拟器上调试项目时,Web Inspector(Tizen SDK的调试工具)将在单独的窗口中打开。

b) Go to the Source tab and enable Debugging : b)转到Source选项卡并启用Debugging:

在此输入图像描述

c) You can also set breakpoints and debug stepping into line of codes. c)您还可以设置断点并调试步进到代码行。 Click on the bottom tab to see the console. 单击底部选项卡以查看控制台。 You can also check the console from console tab and also the IDE. 您还可以从控制台选项卡以及IDE检查控制台。

在此输入图像描述

在此输入图像描述

Otherwise, You can also Run As > Tizen Web Simulator Application (Samsung TV) 否则,您还可以运行为> Tizen Web模拟器应用程序(三星电视)
Then Click on the Inspect Icon & check the console tab. 然后单击Inspect Icon并检查控制台选项卡。

在此输入图像描述

一种解决方法是在您的应用程序中创建自己的记录器区域,并列出使用自定义日志功能打印的内容:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM