ios - console.log 日志未显示在 Xcode 调试记录器中,也未显示在 Safari 调试记录器中
问题描述
我在 cordova/www 下创建了 index.html 文件。通过 iOS 模拟器运行它并执行以下操作:
<!DOCTYPE html> <html> <head> <title>Title</title> </head> <body>
<h1>Hello World1</h1>
<h2>Test this out</h2>
<h2 id="test"></h2>
<script>
console.log("Test")
document.getElementById("test").innerHTML = "text string"
</script>
</html>
HTML 输出显示在模拟器中,并且<h2 id="test"></h2>
还填充了“文本字符串”字符串 - 表示 JS 已启用。
但是,它console.log("Test")
并没有出现在任何地方——不是在 Xcode 调试中,也不是在我从 Safari 运行的调试中。
Howcome 以及如何解决此问题
解决方案
推荐阅读
- lwip - 编译 LwIP 时如何修复编译错误
- java - maven build 无法下载 com.lowagie:itext:jar:2.1.7.js6 依赖项
- ios - 当我的视图加载时,Swift Ui Firebase 数组为空
- javascript - getCoordinates() 函数返回错误的坐标
- java - 如何使用 Swing JAVA 显示带有表情符号的标签
- c# - 为什么统一无法识别我的左移键
- sensors - MODBUS RTU-RS485 ISSUE 温度和湿度,不能同时读取
- version-control - 在 CVS 中如何忽略已经签入的文件
- vuejs2 - 如何根据 VUEJS 中选定的单选按钮显示单选按钮
- c - 释放 void 指针会导致段错误