远程log调试工具console.re
http://console.re/
https://github.com/kurdin/console-remote
前文提到在手机微信上调试代码很痛苦,看不到日志。为了看到日志,得把日志发到服务器,再搞个东西看服务器上的日志。console.re 就是这么一个服务。
主要使用步骤如下:
- 在html文件中引入
<script src="http://console.re/connector.js" data-channel="<your-channel-name>" id="consolerescript"></script>
- 用
console.re.log('...');
记录日志 - 打开 http://console.re/ 看日志
例子:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>logtest</title>
<script src="http://console.re/connector.js" data-channel="trylog" id="consolerescript"></script>
</head>
<body>
<h1>See the log: <a href="http://console.re/trylog" target="_blank">http://console.re/trylog</a></h1>
<h1><a href="javascript:test()">click me to add log</a></h1>
<script>
function test(){
console.re.log('remote log test');
return false;
}
</script>
</body>
</html>
写了个wrapper。根据是否有console.re来调用log。方便调试。
window.log = function(){
if(console.re){
console.re.log.apply(console.re,arguments);
}else{
console.log.apply(console,arguments);
}
};
远程log调试工具console.re的更多相关文章
- js调试工具Console命令详解
这篇文章主要介绍了js调试工具Console命令详解,需要的朋友可以参考下 一.显示信息的命令 复制代码 代码如下: < !DOCTYPE html> < html> &l ...
- 【F12】谷歌浏览器F12前端调试工具 Console
谷歌浏览器F12前端调试工具 Console 前言 先上图:不知道有多少人发现,在浏览器开发工具的“Console”上的百度首页的关于百度招聘的信息: 今天要给大家介绍的就是是Web前端调试工具中的C ...
- js调试工具console详解
#console基本输出方法,占位符:字符(%s).整数(%d).浮点数(%f)和对象(%o) console.log('日志'); console.info('信息'); console.error ...
- var a = {m:1}; var b = a; a.n = b ={n:1}; console.log(a);console.log(b);
var a = {m:1}; var b = a; a.n = b ={n:1}; console.log(a); console.log(b); 确定b为{n:1},所以a为 {m:1,n:{n:1 ...
- js调试工具Console命令详解——转
一.显示信息的命令 <!DOCTYPE html> <html> <head> <title>常用console命令</title> < ...
- js调试工具console方法详解
一.显示信息的方法 最常用的console.log(),一般用来调试. console.log('hello'); console.info('信息'); console.error('错误'); c ...
- console.log()、console.info()、console.debug()的区别
onsole.log().console.info().console.debug()的作用都是在浏览器控制台打印信息的. 使用最多的是console.log().console.info()和con ...
- 一站式远程页面调试工具spy-debugger 2.0,已支持HTTPS
项目名称: spy-debugger 项目地址:https://github.com/wuchangming/spy-debugger 关于spy-debugger npm Build Status ...
- JS里try...catch...finally详解,以及console日志调试(console.log、console.info等)
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
随机推荐
- Vue 的开始
1 框架的 MVVM 模式 ViewModel是Vue.js的核心,它是一个Vue实例.Vue实例是作用于某一个HTML元素上的,这个元素可以是HTML的body元素,也可以是指定了id的某个元素. ...
- gRPC之Node Quick Start
在node环境下我们使用一个小例子作为引导: 在开始之前请确认如下: 1.node:版本在0.12以上 下载这个例子 为了更好地开始这个例子,你需要在本地对这个例子代码做一个备份.下载这个例子的代码从 ...
- 微信小程序 template添加点击事件
介绍template是微信小程序提供的模板,可以在模板中定义代码片段,然后在不同的地方调用. 简单使用定义template因为项目中可能会需要到不止一个template,所以最好新建一个文件夹来存放t ...
- linux分享四:cron系统
cron相关文件: /etc/cron.monthly/ /etc/cron.weekly/ /etc/cron.daily/ /etc/cron.hourly/ /etc/cron.d/ /etc/ ...
- Shell脚本大量示例
Shell基础之控制流结构 一.控制结构 几乎所有的脚本里都有某种流控制结构,很少有例外.流控制是什么?假定有一个脚本,包含下列几个命令: #!/bin/sh # make a directory ...
- PHP+FastCGI+Nginx配置PHP运行环境方法
PHP+FastCGI+Nginx配置PHP运行环境 Nginx不支持对外部程序的调用,所以必须通过FastCGI接口实现对外部程序的调用从而实现对客户端动态页面请求的处理. CGI的英文全称为Com ...
- git clean 小结
删除 一些 没有 Git add 的 文件: git clean 参数 -n 显示 将要 删除的 文件 和 目录 -f 删除 文件,-df 删除 文件 和 目录 git clean -n git c ...
- lua -- 字体闪烁
-- 这里是实现控件的闪烁,不能将一个局部的动作变量,赋给两个控件来动作,只能一个控件对应一个动作 function UIBagController:ShowEffect( ) local tGood ...
- 调试web api的工具 谷歌插件 Restlet
介绍 http://chromecj.com/productivity/2017-08/789.html
- [SQL Server 2014] SQL Server 2014新特性探秘
SQL Server 2014新特性探秘(1)-内存数据库 简介 SQL Server 2014提供了众多激动人心的新功能,但其中我想最让人期待的特性之一就要算内存数据库了.去年我再西雅图参加SQ ...