Uncategorized

VS code for Angular – Setup

Step 1: Install VS Code

Step 2: Install debugger-for-chrome extension

Step 3:

Press F1 to open command prompt in VS code and execute “Tasks: Configure Task Runner Command” this will generate sample tasks.json file in .vscode directory

.vscode folder has launch.json and tasks.json files

Ensure that launch.json has “sourceMaps” : true ,

Example:
 “configurations”: [
        {
            “type”: “chrome”,
            “request”: “launch”,
            “name”: “Launch Chrome”,
            “url”: “http://localhost:4200”,
            “sourceMaps”: true,
            “webRoot”: “${workspaceRoot}”
        }
tasks.json file to contain
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    “version”: “0.1.0”,
    “command”: “tsc”,
    “isShellCommand”: true,
    “args”: [“-p”, “.”],
    “showOutput”: “silent”,
    “problemMatcher”: “$tsc”
}

Note if .vscode does not exits create manual folder in the root directory of the project and add the launch.json manually

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *