远程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 ...
随机推荐
- CentOS扩展库配置
背景:经常用到第三方的库,通过yum命令查询不到.例如:yum search ilbcWarning: No matches found for: ilbc 不要感叹,CentOS没你想象的支持力度那 ...
- mark CodeGenerator
基础权限开发框架 BMS = Spring boot + Mybatis plus + Shiro BMS / bms-admin / src / main / java / com ...
- 在Spring Boot中使用Spring-data-jpa实现分页查询(转)
在我们平时的工作中,查询列表在我们的系统中基本随处可见,那么我们如何使用jpa进行多条件查询以及查询列表分页呢?下面我将介绍两种多条件查询方式. 1.引入起步依赖 2.对thymeleaf和jpa进 ...
- Android app启动activity并调用onCreate()方法时都默默地干了什么?
Android app启动activity并调用onCreate() 方法时都默默地干了什么? 在AndroidManifest.xml文件中的<intent-filter>元素中有这 ...
- Tsk4.5异步
public async void LoadData<T>(WhereClip where,OrderByClip order) where T : Entity, new() { try ...
- 【Unity】8.3 布局模式(GUILayout)
分类:Unity.C#.VS2015 创建日期:2016-04-27 一.简介 在Unity 5.x中,GUI控件的布局方式有两种. 一种为固定布局,即在绘制控件的时候将位置参数传入,指定控件的精确位 ...
- android使用百度地图SDK 去掉百度Logo的小技巧
// 隐藏logoView child = mMapView.getChildAt(1); if (child != null && (child instanceof ImageVi ...
- golang 解决 TCP 粘包问题
什么是 TCP 粘包问题以及为什么会产生 TCP 粘包,本文不加讨论.本文使用 golang 的 bufio.Scanner 来实现自定义协议解包. 协议数据包定义 本文模拟一个日志服务器,该服务器接 ...
- git将本地项目添加到github上
git init git add . git commit -m '添加备注' git add remote origin originUrl git push -u origin master 注意 ...
- 四步法分析定位生产环境下MySQL上千条SQL中的问题所在
第一步:通过以下两种方式之一来打开慢查询功能 (1)方式一:通过修改mysql的my.cnf文件 如果是5.0或5.1等版本需要增加以下选项: log-slow-queries="mysql ...