Closed Josverl closed 2 years ago
Thanks!! I've been looking for that.
You would need to bind the method for it to work
info: outputChannel.appendLine.bind(outputChannel)
or you could do this
info: (...params) => outputChannel.appendLine(...params)
The reason it works for console.log is that the custom methods get mounted in an object that's already bound to console.
binding seems to work , but still it does not appear to be called /integrated by consolite, and im not sure how to trace/debug that (see above PR)
I think the 2nd example may be typescript , at least that is what code thinks :-)
My bad. I had accidentally written a :
instead of a =>
. 😅
I found the issue. appendLine
only accepts a single string, while console[method]
supports a variadic input of any type. The solutions was
I have merged your PR with the changes into next-staging.
Feature Request 🚀
Is your feature request related to a problem? Please describe.
to report/troubleshoot problem end-users are directed to the developer debug logs in vscode.
While this works for experienced users, these are not intended to be used by end-users, and there is oven a lot of other information shown, that has little relevance to Pymakr.
Also it is not so discoverable for end users. (by design)
better yet, there is functionality in vscode that can be accessed with just a few lines of code
Describe the solution you'd like
something like :
However I could not find how to persuade
consolite
to calloutputChannel.appendLine
rather thanconsole.log
Teachability, Documentation, Adoption, Migration Strategy