🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more
Socket
Book a DemoInstallSign in
Socket

mydebuglog

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mydebuglog

自定义模块debuglog调试工具

latest
npmnpm
Version
1.0.7
Version published
Maintainers
2
Created
Source

README

安装

通过npm install mydebuglog --save-dev引入模块

使用

1. (推荐)通过终端命令行直接运行npm run serve -- --debuglog=modelName1,modelName2...

  • 在vue.config.js中引入MyDebugLogConfig模块 const { MyDebugLogConfig } = require('myDebugLog');并在chainWebpack中引用

2. 在浏览器url添加debuglog=[modelName1,modelName2...],用逗号或者空格隔开

3. (Vue项目)通过终端运行 npm run debuglog 运行项目

  • debuglog脚本配置:"debuglog": "vue-cli-service serve --mode debuglog"
  • 配置文件:在项目根目录下添加.env.debuglog配置文件,并在文件内添加变量名 VUE_APP_DEBUGLOGLIST=modelName1,modelName2...

用逗号或者空格隔开

代码示例

在需要打印对应模块的代码中创建对应的实例,并给实例传递要打印的信息

const { MyDebugLog } = require('mydebuglog');  
const myDebuglog = MyDebugLog('modele1');
myDebuglog('show modele1 log')

FAQs

Package last updated on 07 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts