why you don't need console.log

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025

Комментарии • 72

  • @bishal_mishra99
    @bishal_mishra99 6 дней назад +27

    Cool. How do you log dynamic values

    • @harshitgupta275
      @harshitgupta275 3 дня назад +1

      Did you find any answer?

    • @ulfgj
      @ulfgj 2 дня назад

      this we need.

    • @DJReRun
      @DJReRun 11 часов назад

      Also, where is the "log point" stored? Is it in an external file that's _near_ to the source so that it can be tracked by source control or is it only local to VSCode and the current user?

    • @christopherfox6914
      @christopherfox6914 4 часа назад

      If you mean variables, use {variablename} in your log point message.

  • @elProdigio
    @elProdigio 6 дней назад +6

    Nice feature. Before this feature exists I remember to use conditional breakpoints to put console.log inside of the condition (it never stops because console.log return a falsy value). I also use conditional breakpoints to change some data conditionally. For example change user variable to "test" when the amount value is 999. This code will be into the condition of the breakpoint:
    amount === 999 && user="test" && false
    About the video the only "but" is that you need to run the code into a debug session (slower), and depending on how the protect is configured, is not always possible to debug.

  • @vulkanosaure
    @vulkanosaure 5 дней назад +3

    It's a great advice
    for people who aren't using a debugger

  • @muraliavarma
    @muraliavarma 4 дня назад +2

    This feature also exists in the chrome dev tools btw. Very useful for quick debugging on the browser

  • @mahmood466
    @mahmood466 6 дней назад +2

    Does it support string interpolation, something like "here value is ${value}"?

  • @dytra_io
    @dytra_io 4 дня назад +2

    does this feature supports expression/variable ? because I often console log the request/response

  • @joergw
    @joergw 6 дней назад

    Thanks, never heard about log points before

  • @SwoggersLOL
    @SwoggersLOL 5 дней назад

    Yea, but you could merge the print statements into a write stream function so that you could make a log file at the same time you're printing logs

  • @good-dev-student
    @good-dev-student 6 дней назад

    Cool any other tricks like this ❤

  • @VishalPawarR
    @VishalPawarR 6 дней назад

    Looks clean but removing the logpoint console after adding is an extra step!

  • @deheinrich4785
    @deheinrich4785 6 дней назад

    This hint came just in time thanks!
    Will these Statements appear in the terminal that I do npm run dev with?

  • @nicolasmayorga8288
    @nicolasmayorga8288 5 дней назад

    That's amazing but what if I need to log a variable?

  • @DanielEnesi17
    @DanielEnesi17 6 дней назад

    Wow. That's awesome - and convenient.
    Thanks!

  • @anu1o
    @anu1o 6 дней назад

    Awesome 👍🏻 🔥

  • @mohamedkarim-p7j
    @mohamedkarim-p7j 6 дней назад +1

    Thank for sharing

  • @AkukweEbube
    @AkukweEbube 6 дней назад

    Didn't know about this. Nice one

  • @tubero911
    @tubero911 6 дней назад

    Works in other languages too: python, dart, lua, and java.

  • @caujka
    @caujka 6 дней назад

    Blimey, this is so awesome!

  • @asanka.abewickrama
    @asanka.abewickrama 6 дней назад

    Wow, that's very helpful for me.🎉

  • @second9320
    @second9320 6 дней назад

    All pushes with log or todo give warning these days. What is this for?

  • @shivjirwankar1993
    @shivjirwankar1993 6 дней назад

    Awesome. Much needed feature.

  • @ayivugwekabemba
    @ayivugwekabemba 6 дней назад

    Wow. Thank you. I didn't know this one.

  • @ste-fa-no
    @ste-fa-no 6 дней назад

    Would those be exportable/importable?

  • @ayviuon
    @ayviuon 4 дня назад

    Multiple steps just to put a logpoint seems like alot of hassle, writing console log is quicker 🤷‍♂️

  • @martygo
    @martygo 6 дней назад

    Awesome 🎉

  • @Twas-RightHere
    @Twas-RightHere 18 часов назад

    Doesn't work for client code though, which is what most react apps are...

  • @mukundm2023
    @mukundm2023 6 дней назад

    Does it work for all major languages or just js?

  • @jakubtomas21
    @jakubtomas21 6 дней назад

    What if want to see data in property? Like response data

  • @rajgopaljakhmola6080
    @rajgopaljakhmola6080 5 дней назад

    But what about logging into the browser?

  • @arturomedina2055
    @arturomedina2055 6 дней назад

    Does this work with tools like Vite?

  • @debjyotibanerjee6382
    @debjyotibanerjee6382 6 дней назад

    Will the log points be visible in browser console?

  • @investkalimot7499
    @investkalimot7499 5 дней назад

    how to logs the variables?

  • @wzup23
    @wzup23 6 дней назад

    Wow! Thus one's great feature.

  • @henryantwi8222
    @henryantwi8222 6 дней назад

    This is very useful 👌 👍

  • @ruralanemone6633
    @ruralanemone6633 2 часа назад

    convenient, yeah
    portable, no
    hello monopoly?????

  • @prana-ayama
    @prana-ayama 6 дней назад

    Will the registered logpoints be shared with git?

  • @alihelmi
    @alihelmi 5 дней назад

    How to log variables?

  • @VictorMartins239
    @VictorMartins239 5 дней назад

    can it log variables? it doesnt look it does

  • @TheAbhishekJadhav
    @TheAbhishekJadhav 5 дней назад

    Ftw why haven’t I seen this earlier 😮

  • @prajwalitsinghraja3196
    @prajwalitsinghraja3196 6 дней назад

    I will give it a try, it's worth it, I think so.

  • @pang12345
    @pang12345 6 дней назад

    Is that only possible in debug mode?

  • @NilisW
    @NilisW 6 дней назад

    Good one

  • @rakysreplays8259
    @rakysreplays8259 6 дней назад

    Very useful, thanks

  • @rotimibest8530
    @rotimibest8530 6 дней назад

    How do I remove log points?

  • @armangohari6193
    @armangohari6193 6 дней назад

    Nice one.

  • @Redragon2501
    @Redragon2501 4 дня назад

    Can't make it work in my vue.js app

  • @rahulpurohit6246
    @rahulpurohit6246 6 дней назад

    Does it work for react native

  • @marlo3464
    @marlo3464 6 дней назад +1

    this does not gonna work in production. It is ok for frontend, but for backend you critically need to have logging in your system

  • @4w0ken
    @4w0ken 6 дней назад

    or just, and maybe im tripping, use the debugger

  • @TheBambooooooooo
    @TheBambooooooooo 6 дней назад

    Beautiful

  • @beyondcrud
    @beyondcrud 5 дней назад

    Wow very helpful

  • @hanibachi5228
    @hanibachi5228 6 дней назад

    Now thats a usefull short

  • @sssrikanthhh
    @sssrikanthhh 4 дня назад

    Nice trick 👍

  • @samnmeje3486
    @samnmeje3486 5 дней назад

    this is awesome

  • @kingmaxilla
    @kingmaxilla 6 дней назад +1

    👍🙂👍

  • @samuelvalentine7846
    @samuelvalentine7846 4 дня назад

    This is niceee

  • @applernb3773
    @applernb3773 5 дней назад

    The point is Not much visible though

  • @biggaji0
    @biggaji0 6 дней назад

    great feature

  • @stonecoder8697
    @stonecoder8697 6 дней назад

    This is big for I.

  • @sergiobenitez1468
    @sergiobenitez1468 6 дней назад

    this is gold

  • @yassine-sa
    @yassine-sa 6 дней назад

    That's neat

  • @rockmonty
    @rockmonty 4 дня назад

    👍

  • @JermaineMorgan
    @JermaineMorgan 6 дней назад

    Get outta here!!!!

  • @OggVorbis69
    @OggVorbis69 6 дней назад

    Now does the log statements appear in the source?

  • @khatmanworld
    @khatmanworld 6 дней назад

    Not sold. Thanks. Console.log for life

  • @yassinebenkraouda
    @yassinebenkraouda 6 дней назад

    Console.log is good why drop it?

  • @stefancomandant8683
    @stefancomandant8683 6 дней назад

    Nope, mine say
    console.log("shit1")
    console.log("shit2")
    console.log("shit3")