Debug a React app with Visual Studio Code

Поділитися
Вставка
  • Опубліковано 24 лис 2024

КОМЕНТАРІ • 39

  • @mugishaalainchristian2613
    @mugishaalainchristian2613 9 місяців тому +5

    Thanks man, I was looking for this and All I could see was 1 hour long videos

  • @lokehirl
    @lokehirl 10 місяців тому +4

    Thank you, I learnt something new and useful thing today as a developer.

  • @StephenBeale
    @StephenBeale 5 місяців тому +2

    just what I needed, short and succinct and got the job done - much appreciated!

  • @leucthinh3226
    @leucthinh3226 Місяць тому

    I've been using log statement for 2 years. Now you just change my entire career xD

  • @KC-hl4oj
    @KC-hl4oj 10 місяців тому +1

    Thanks for this great tutorial

  • @dcaballero_97
    @dcaballero_97 5 місяців тому

    Thanks so much. You make it easy and look easy for us too lol

  • @Sarlasnw
    @Sarlasnw 3 місяці тому

    That's helped me a lot! Thank you, bro.

  • @carlosenriquecastanedaguti8130
    @carlosenriquecastanedaguti8130 3 місяці тому

    Excelent explanation, thanks very much for your video.

  • @SeanAhrens
    @SeanAhrens 10 місяців тому +1

    Are you the voice of "not what you think" videos on UA-cam? Very similar!

    • @DevLeonardo
      @DevLeonardo  10 місяців тому

      Unfortunately not, I wish I had a similar amount of subscribers though 😂

  • @mylesgideonprospero
    @mylesgideonprospero 9 місяців тому

    If you were to debug your React project's problem involved with unidentified and unwanted re-renders. How would you do it?
    (This video was titled Debugging with React App so I expected it to show a re-rendering problem ✌ )

  • @n8900498
    @n8900498 4 місяці тому

    Do you have a repo for your code you using to demonstrate, I am very new to React and wish to follow your tutorial using your code

  • @chandanmb7
    @chandanmb7 2 місяці тому

    Hi, Nice video.
    Not sure the debug point is not coming to vs code . Do we have special settings done ? Any help would be appreciated

  • @wzup23
    @wzup23 4 місяці тому

    Dude thank you!

  • @Lessthan100lines
    @Lessthan100lines 11 місяців тому +1

    thank you

  • @vetedde
    @vetedde 6 місяців тому

    Thanks! Vere helpful!

  • @martinocom
    @martinocom Рік тому +1

    How about React Native? Are we still stuck with Flipper?

    • @DevLeonardo
      @DevLeonardo  Рік тому

      I have never tried but I think it should be possible to do pretty much the same, with a dedicated entry in launch.json

  • @PAdithya-l2r
    @PAdithya-l2r 4 місяці тому

    thank you very much
    helped a lot

  • @adusparx
    @adusparx 5 місяців тому

    Perfect video

  • @dios8256
    @dios8256 10 місяців тому

    Nice one thanks

  • @golcuk2076
    @golcuk2076 9 місяців тому +1

    Well, what if I have a backend where I want to debug that runs on 4000 port, and in my case I have a front end and when I click the signup button it goes to my back-end code and I want to debug there so in my launch.json file should change the "url" property to 4000 which is my backend?

    • @DevLeonardo
      @DevLeonardo  9 місяців тому

      The debugger is attached to a port (the one you defined in the settings, at the beginning of this video).
      If you have a frontend and a backend app, running on two separate ports, I'd probably say the easiest way is to launch two separate debuggers.

    • @golcuk2076
      @golcuk2076 9 місяців тому

      Okey I handled it what to do I defined my launch.json like this:
      {
      "version": "0.2.0",
      "configurations": [
      {
      "name": "Launch Chrome",
      "request": "launch",
      "type": "chrome",
      "url": "localhost:3000",
      "webRoot": "${workspaceFolder}"
      },
      {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "skipFiles": ["/**"],
      "program": "${workspaceFolder}\\backend\\src\\app.js"
      }
      ]
      }
      But when you want to debug the backend it wants you to change import syntax in files and add "type:module" to package.json. It was interesting to solve but it was solved. Maybe you may take another video about it because it might be pretty confusing for those who don't know how to do that.

    • @DevLeonardo
      @DevLeonardo  9 місяців тому

      Cool! So here as I can see it is assuming that on 3000 you already have the frontend running, and the debugger spins the backend using app.js as an entrypoint?

    • @golcuk2076
      @golcuk2076 9 місяців тому +1

      yeap!

    • @DevLeonardo
      @DevLeonardo  9 місяців тому +1

      Thanks for sharing! I'll see if I can investigate more and make a video out of it :D

  • @maksymbaranovskyi8362
    @maksymbaranovskyi8362 10 місяців тому

    Is there a way we can use the native browser window instead of the built-in browser that opens up? It doesn't have my extensions and look different overall.

    • @DevLeonardo
      @DevLeonardo  10 місяців тому

      Hey! It should be possible to launch a specific browser, but it can be even easier to directly use the brower at that point. I made a video on how to use your own Chrome instance: ua-cam.com/video/t1aEXEvYzvM/v-deo.html

  • @hiranga
    @hiranga 4 місяці тому

    ah this helps 💪🏾💪🏾

  • @mdwahidali6053
    @mdwahidali6053 2 місяці тому

    How to debug react code in webstorm?

  • @PatoToledo23
    @PatoToledo23 4 місяці тому

    Gracias pibe

  • @jsonslim
    @jsonslim 7 днів тому

    Thanks! How to make it in Firefox?

    • @DevLeonardo
      @DevLeonardo  4 дні тому

      The debugger here is on vscode, should work on all browsers :)

  • @watchnow4211
    @watchnow4211 10 місяців тому +1

    U could have demonstrated this by simple code

    • @DevLeonardo
      @DevLeonardo  10 місяців тому +5

      Thanks for the comment! Do you think a smaller app with just a couple of components was better to showcase the debugger? I didn't wont to oversimplify it, but maybe I made it too confusing. Let me know :D

    • @thesadnesspath8371
      @thesadnesspath8371 3 місяці тому

      ​Yes that would have been better

  • @vohoanghaduong6639
    @vohoanghaduong6639 8 місяців тому

    thanks a lot