skip to Main Content

Before I always debug an reactjs application in vscode directly in the jsx component file. Now I can’t do it because when I try to debug vscode tries to debug a file called main.chunk.js. I’m using chrome too.

Vs Code Debugging a main.chunk.js

I would like to return debugging directly in component jsx file. Do you have a suggestions of how to do it ?

4

Answers


  1. Same problem here! =(

    The funny thing is that the first time it works correctly by vscode, but during the debug it stops working and goes into main.chunk.js.

    ——– Edit

    A modification I made here and that apparently worked…

    In the browser:

    Inspect > Preference Settings > Workspace > Add Folder (Project Root)

    Login or Signup to reply.
  2. I was getting the same issue and tried multiple settings before reinstalling VSCode. Even installing the same version seems to have fixed this issue for me. Will update if I run into the issue again.

    Login or Signup to reply.
  3. Happens to me sometimes with REACT + vs code.
    Usually after I save, and react live updates and recompiles the code.
    I find that if I stop the npm process which is serving react: npm start, and then restart both it, and the vscode debugger, then everything works.

    Login or Signup to reply.
  4. Happens to me when working with React+VSCode. Tried some of the above with no success.
    My finding are that it happens only after hot-reload.
    My current solution was to stop and start app and chrome debugger, and than it works until the next hot-reload.
    I’m still looking for a permanent solution

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search