How To Fix VSCode: Exception has occurred: ReferenceError: closeDescriptionPopup is not defined

Viewed 1785

Not sure how this problem specifically occurred. I've been doing some googling trying to narrow down what exactly is going wrong as my project was fine a few days ago. When i attempt to debug my VSCODE project i'm presented with this error.

enter image description here

this is a picture of my launch.json file:

enter image description here

Also, this an error if it helps displayed in the debug console.

enter image description here

Things i've tried so far,

  1. Rebooting the computer

  2. Uninstalling and Reinstalling VSCODE as well as disabling extensions

  3. Creating a new VSCODE Project to attempt to debug

  4. Deleting the launch.json file and creating a new one

4 Answers

After spending some time debugging I solved this problem by simply installing npm packages, I executed command npm i

Just make sure that your npm packages are all installed and none is failing.

Hopefully this helps you or someone with the same issue.

I've solve this problem.

Remove the launch.json file and do not replace it.

Just try to build with F5 button.

  1. Start Debugging from within VSCode
  2. run npm start from a separate terminal and wait for the server to start
  3. refresh the page in your browser

My intuition is that this would create 2 instances of the server binding to the same port and cause a bunch of problems. I'm not sure why, but in my case it worked as expected and let me debug with breakpoints normally.

You don’t need to use the VS Code run button with Live Server. You just right-click the HTML file in explorer and use the menu option “Open with Live Server”.

Related