Chakroun-Anas / turbo-console-log

591 stars 141 forks source link

how to make it console in the next line #110

Open weihomechen opened 3 years ago

weihomechen commented 3 years ago

image my configuration : image

MariuzM commented 3 years ago

yep started having same issue with this new update....

Chakroun-Anas commented 3 years ago

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 😉

WaqqarSuleman commented 3 years ago

Hi @Chakroun-Anas , I updated to the latest version but the issue persists. Please look into it.

Chakroun-Anas commented 3 years ago

Hello @WaqqarSuleman, the extension (v2.1.5 and above) is now handling the shared scenario above:

Screenshot 2020-11-26 at 16 02 56

Please share the exacte code snippet where it's not working properly for you, thanks.

WaqqarSuleman commented 3 years ago

Please refer to the screenshot below:

Screenshot from 2020-11-26 20-40-22

Chakroun-Anas commented 3 years ago

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.

aguscha333 commented 3 years ago

Hi, I am on v2.1.5 and I am getting the following issue when commenting react native code:

image

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

borishere commented 3 years ago

Too many use cases are broken since last updates!

MariuzM commented 3 years ago

Yep agree with @borishere issues for me also

Chakroun-Anas commented 3 years ago

@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 :/

Chakroun-Anas commented 3 years ago

@aguscha333 @WaqqarSuleman I just pushed a version (v2.1.6) that deals with what you shared, please test again and give me your feedback 😉

WaqqarSuleman commented 3 years ago

@Chakroun-Anas it seems to be working fine atm. Thanks!

aaronkychan commented 3 years ago

v2.1.6, still broken for me consolelogmisbehave

sebj54 commented 3 years ago

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
        },
    },
}

image

axhamre commented 3 years ago

I'm in a TypeScript project, without semi-colons. Downgrading the version to 1.4 solved it for me:

image image
jportella93 commented 3 years ago

Is there any way to just print the log message on the next line? I rather get consistent behavior.

Aleksandern commented 2 years ago

Since there is no fix for this issue I use the following extension https://github.com/shangZhengXie/vscode-console-helper

borishere commented 2 years ago

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.

mribichich commented 1 year ago

any news of this feature? maybe a simple setting to insert into next line?

GemKosan commented 1 year ago

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.