'Problem with launch.json file: Visual Studios Code -> Firefox for localhost not working
So I want to launch my JavaScript code from VS-Code to Firefox but cant figure out how to setup the launch.json file.
Terminal: Terminal view when I run: npm run dev
Debug URL option: When I hover over "local: http://localhost:3000/"
Error: Error message that pops up when I try "Debug URL"
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "firefox",
"request": "attach",
"name": "Attach"
},
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch Firefox against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"program": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"
},
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"reloadOnAttach": true,
"name": "Launch index.html",
"file": "${workspaceFolder}/index.html"
},
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\Project 3 Three.js\\main.js"
}
]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
