惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

个人技术分享

GPT指令详细资料 – 个人技术分享 php操作cookie 转换数组形式,可取某一个值 – 个人技术分享 php操作cookie字符串,替换对应值 – 个人技术分享 php 操作cookie值 – 个人技术分享 fastadmin appendfieldlist 用法 – 个人技术分享 PHP 转到 Go – 个人技术分享 PHP使用无头浏览器如何帮助数据提取和抓取 – 个人技术分享 解决移动设备上的所有浏览器顶部都有地址栏,导致高度问题 – 个人技术分享 Python框架 Flask和Django – 区别 – 个人技术分享 PHP To Go 转型手记 – 个人技术分享 真正的50行css代码实现响应式“瀑布流”布局 – 个人技术分享
js 引入vconsole – 个人技术分享
hanhanjun888 · 2024-08-06 · via 个人技术分享

介绍

vConsole 是一个轻量、可拓展、针对手机网页的前端开发者调试面板。
vconsole的解释是控制台;类似浏览器F12。

特性

  • 查看 console 日志
  • 查看网络请求
  • 查看页面 element 结构
  • 查看 Cookies、localStorage 和 SessionStorage
  • 手动执行 JS 命令行
  • 自定义插件

github
vConsole的github地址

引入

  • 使用 CDN 直接插入到 HTML (方法1)
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
  // VConsole 默认会挂载到 `window.VConsole` 上
  var vConsole = new window.VConsole();
</script>
  • 使用 es6 webpack 引入 (方法2)
1.安装
npm install vconsole 或 cnpm install vconsole  

2.引入
import VConsole from 'vconsole'; 
const vConsole = new VConsole();
// 接下来即可照常使用 `console` 等方法
console.log('Hello world');

3.区分线上线下环境  
if (isDebug) {
  new VConsole();
}

4.结束调试后,可移除掉
vConsole.destroy();

demo地址:http://wechatfe.github.io/vconsole/demo.html

还有一种工具—–eruda

<script src="//cdn.bootcss.com/eruda/1.5.2/eruda.min.js"></script>
<script>eruda.init();</script>