Launch.json: Attribute 'program' does not exist "path"


#1

Hello,

I’m unsuccessfully trying to run the ‘Launch Program’ debug mode of my Ionic 2 app.
I’m getting the error "Attribute 'program' does not exist" followed by the path where app.ts is supposed to be.
By default, my launch.json looks like this:

"version": "0.2.0",
"configurations": [
    
    {
        "type": "node",
        "request": "launch",
        "name": "Launch Program",
        "program": "${workspaceRoot}\\app.ts",
        "cwd": "${workspaceRoot}",
        "outFiles": [],
        "sourceMaps": true
    },
    {
        "type": "node",
        "request": "attach",
        "name": "Attach to Process",
        "port": 5858,
        "outFiles": [],
        "sourceMaps": true
    }
 ]

The thing is, i’ve searched my directories and I can’t find “app.ts” anywhere. I’ve tryed replacing this file by several others but the error stays the same.
Also, i’ve been willing to use the Cordova Tools extension. The installation worked fine but my launch.json’s configurations wasn’t updated (I don’t know if that’s normal) so i had to search the internet for a configuration to try to “Run Android on device” for instance.
Here’s how the configuration for this launch mode looks like;

{
        "name": "Run Android on device",
        "cwd": "${workspaceRoot}",
        "type": "cordova",
        "request": "launch",
        "platform": "android",
        "target": "device",
        "port": 9222,
        "sourceMaps": true
    }

I’m getting the error

Couldn’t find ionic.config.json file. Are you in an Ionic project?
‘ionic run android --device --verbose’ failed with exit code 1

I’d be grateful for any help! Thanks