Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不知道是不是BUG还是我自己项目的原因 #5

Closed
yzw7489757 opened this issue May 8, 2018 · 6 comments
Closed

不知道是不是BUG还是我自己项目的原因 #5

yzw7489757 opened this issue May 8, 2018 · 6 comments
Labels
feature Want to add features question Further information is requested

Comments

@yzw7489757
Copy link

image
在我项目里,除了-sign和-time能用之外,其他的要么是什么都不返回,要么就是打印hellowrold

@TaroXin
Copy link
Owner

TaroXin commented May 8, 2018

-count 指令是有限制的,只能在方法声明时候使用,这个你应该仔细看一下配置问题

testFn (a, b) { // {#} -stop -count

}

-t 指令是建立在 存在 -e -d -w -i 任意一个指令,如果没有这几个指令,-t 同样会失效

-error 指令是不存在的,请使用 -e

@TaroXin TaroXin added the question Further information is requested label May 8, 2018
@yzw7489757
Copy link
Author

假如vue组件内一个方法调用this.dataA 怎么能直接打印this.dataA的值。只能方法声明的时候才能用到话总觉得少了点什么,我想在方法内发出ajax之前时候去查看这个参数。

@TaroXin
Copy link
Owner

TaroXin commented May 9, 2018

你可以如下使用

this.dataA() // {#}
// 这样会打印这个方法的返回值,但是不能打印方法的参数信息 
methods: {
    dataA (a, b) { // {#}
        // 这样会打印 a 和 b两个参数
    }
}

但是根据我的理解,你的需求是这样的

this.dataA(a) // {#}
// 你希望的结果是下面这样的
console.log(a)
const result = this.dataA(a)
console.log(result)

此功能目前还没有实现,不过是个好想法,下个版本更新会加上该功能,谢谢反馈

@TaroXin TaroXin added the feature Want to add features label May 9, 2018
@yzw7489757
Copy link
Author

还有一个问题,就是打印出来的值,行数会显示不对
image
image
image
image

@TaroXin
Copy link
Owner

TaroXin commented May 9, 2018

你点击后面的行数,他就会跳转到对应的地方,这个行数不是由 vue-pretty-logger 来对应的,是 console 的机制,行数也不一定会对应源文件中的行数,因为源文件会经过各种处理之后才会显示在页面上

TaroXin added a commit that referenced this issue May 9, 2018
BREAKING CHANGE: add the -from command to output function call parameters

re #5
@TaroXin
Copy link
Owner

TaroXin commented May 9, 2018

需求功能已经实现,你可以使用 -from 参数对函数调用进行操作,该命令会打印方法调用时所传递的参数信息,-sign 参数存在的情况下则会输出函数实参所对应的形参

@TaroXin TaroXin closed this as completed May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Want to add features question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants