Open weihomechen opened 3 years ago
yep started having same issue with this new update....
Hello @weihomechen , i just pushed a version (2.1.5) that deal with the scenario that you shared, thank you so much for sharing and don't hesitate to share more problems in the futur so that we fix them and make the extension more robust 😉
Hi @Chakroun-Anas , I updated to the latest version but the issue persists. Please look into it.
Hello @WaqqarSuleman, the extension (v2.1.5 and above) is now handling the shared scenario above:
Please share the exacte code snippet where it's not working properly for you, thanks.
Please refer to the screenshot below:
Hello @WaqqarSuleman, this is a different use case than the first one, here you are trying to insert a log message related to deconstructed property, i will come with a fix for this also and let know when it's published, thank you for you feedback.
Hi, I am on v2.1.5 and I am getting the following issue when commenting react native code:
I am trying to log the params constant and when I hit ctrl+alt+l then it adds the log but after the next line of actual code
Too many use cases are broken since last updates!
Yep agree with @borishere issues for me also
@aguscha333 Thank you for sharing, at this stage a log message related to a deconstructed property is a known issue, see the two posts juste above your post.
@borishere @MariuzM Can you please share with me the code snippet for each use case where the extension fails to deduce the right line code for the log message to be inserted ? without this i'm afraid that i couldn't do much for you :/
@aguscha333 @WaqqarSuleman I just pushed a version (v2.1.6) that deals with what you shared, please test again and give me your feedback 😉
@Chakroun-Anas it seems to be working fine atm. Thanks!
v2.1.6, still broken for me
Hi @Chakroun-Anas, like the other users here, many use cases are broken since a previous update, especially for those like me who codes without semicolons
Since my codestyle breaks the "autodetect line to insert TCL" feature, I think a "force insert on next line" setting would be great.
Actually, TCL lines are more often on a wrong line than in the correct line. I often have to use Ctrl+F to find where my log has been inserted (it is a nightmare when you start to fold blocks) and then I have to move it manually. It also breaks the "comment all" and "remove all" features because the TCL line has been edited manually.
Thanks for your amazing extension anyway, it is still time-savy!
You can try this snippet if you'd like (select this.foo
):
export default {
created() {
this.foo()
this.bar()
},
methods: {
foo() {
return 1 + 1
},
bar() {
return 2 + 2
},
},
}
I'm in a TypeScript project, without semi-colons. Downgrading the version to 1.4 solved it for me:
Is there any way to just print the log message on the next line? I rather get consistent behavior.
Since there is no fix for this issue I use the following extension https://github.com/shangZhengXie/vscode-console-helper
Since there is no fix for this issue I use the following extension https://github.com/shangZhengXie/vscode-console-helper
Thanks for letting know the alternatives. Really tired of this bug.
any news of this feature? maybe a simple setting to insert into next line?
I'm also able to repro this issue. And in my React code, it often places the log statement inside a JSX block, where it's sure to fail.
Suggestion: Maybe a simple workaround would be to include a setting that sends the statement to my clipboard instead of inserting it into the cod. That way I can paste it exactly where it is needed.
my configuration :