Json and visual studio code


#1

Hi! I am new to JS world and I try to handle my coding mistakes with getting the code to VS code for debugging. The issue with the debugging is that I don’t get this thing to work correctly in VS code. I have the debugger for chrome installed.

launch.js is looking like this:

{

// 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": "chrome",
        "request": "attach",
        "name": "Attach to Chrome",
        "port": 9222,
        "webRoot": "${workspaceFolder}/Desktop"
    },

    
    {
        "type": "chrome",
        "request": "launch",
        "name": "Launch Chrome against localhost",
        "url": "http://localhost:9222",
        "webRoot": "${workspaceFolder}/Desktop"
    
    }
]

}

in node it’s like this:

{
// 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”: “node”,
“request”: “launch”,
“name”: “Launch Program”,
“program”: “${workspaceFolder}/Desktop”

    }
]

}

I wonder how to I get this work or I should change to VS whatever the year of paid version, which has a normal debugger?