http://console.re/

https://github.com/kurdin/console-remote

前文提到在手机微信上调试代码很痛苦,看不到日志。为了看到日志,得把日志发到服务器,再搞个东西看服务器上的日志。console.re 就是这么一个服务。

主要使用步骤如下:

  1. 在html文件中引入
    <script src="http://console.re/connector.js" data-channel="<your-channel-name>" id="consolerescript"></script>
  2. console.re.log('...');记录日志
  3. 打开 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的更多相关文章

  1. js调试工具Console命令详解

    这篇文章主要介绍了js调试工具Console命令详解,需要的朋友可以参考下   一.显示信息的命令 复制代码 代码如下: < !DOCTYPE html> < html> &l ...

  2. 【F12】谷歌浏览器F12前端调试工具 Console

    谷歌浏览器F12前端调试工具 Console 前言 先上图:不知道有多少人发现,在浏览器开发工具的“Console”上的百度首页的关于百度招聘的信息: 今天要给大家介绍的就是是Web前端调试工具中的C ...

  3. js调试工具console详解

    #console基本输出方法,占位符:字符(%s).整数(%d).浮点数(%f)和对象(%o) console.log('日志'); console.info('信息'); console.error ...

  4. 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 ...

  5. js调试工具Console命令详解——转

    一.显示信息的命令 <!DOCTYPE html> <html> <head> <title>常用console命令</title> < ...

  6. js调试工具console方法详解

    一.显示信息的方法 最常用的console.log(),一般用来调试. console.log('hello'); console.info('信息'); console.error('错误'); c ...

  7. console.log()、console.info()、console.debug()的区别

    onsole.log().console.info().console.debug()的作用都是在浏览器控制台打印信息的. 使用最多的是console.log().console.info()和con ...

  8. 一站式远程页面调试工具spy-debugger 2.0,已支持HTTPS

    项目名称: spy-debugger 项目地址:https://github.com/wuchangming/spy-debugger 关于spy-debugger npm Build Status ...

  9. JS里try...catch...finally详解,以及console日志调试(console.log、console.info等)

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

随机推荐

  1. Python 文件 next() 方法

    描述 Python 3 中的 文件 对象不支持 next() 方法. Python 3 的内置函数 next() 通过迭代器调用 __next__() 方法返回下一项. 在循环中,next()方法会在 ...

  2. hibernate的hql查询语句总结

    这篇随笔将会记录hql的常用的查询语句,为日后查看提供便利. 在这里通过定义了三个类,Special.Classroom.Student来做测试,Special与Classroom是一对多,Class ...

  3. java时区转化相关工具方法

    import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;import java. ...

  4. window.location.href 与 window.loaction.replace区别

    window.location.href和window.location.replace的区别 1.window.location.href=“url”:改变url地址: 2.window.locat ...

  5. windows 自动移动maven jar包到jmeter 文件夹下面

    jmeter 自动移动maven jar包到jmeter 文件夹下面 bat 文件 rem 本文件放在jmeter 脚本maven项目根目录下面,和pom.xml在同一个文件夹下面 rem 预置条件, ...

  6. 收集一些有意思的ASCII程序注释(持续收集中,希望大家踊跃贡献)

      /** * * created by Mr.Simple, Aug 21, 20141:51:40 PM. * Copyright (c) 2014, hehonghui@umeng.com Al ...

  7. ActionBar 笔记

    博客地址: http://blog.csdn.net/eclipsexys/article/details/8688538 官方文档: http://developer.android.com/gui ...

  8. angular的uiRouter服务学习(4)

    本篇接着上一篇angular的uiRouter服务学习(3)继续讲解uiRouter的用法 本篇主要讲解uiRouter的url路由 大多数情况下,状态是和url相关联的: 当url改变,激活对应的状 ...

  9. linux命令(53):用户和用户组

    Linux 用户和用户组详细解说 本文主要讲述在Linux 系统中用户(user)和用户组(group)管理相应的概念: 用户(user)和用户组(group)相关命令的列举: 其中也对单用户多任务, ...

  10. 【驱动】LCD驱动(FrameBuffer)分析

    背景知识 在多媒体的推动下,彩色LCD越来越多地应用到嵌入式系统中,PDA和手机等大多都采用LCD作为显示器材,因此LCD的应用很有实际意义! LCD工作的硬件需求:要使一块LCD正常的显示文字或图像 ...