最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - VSCode - Chrome Debug - Unverified Breakpoint - Stack Overflow

programmeradmin1浏览0评论

I have a problem with debugging my angular ponent inside .ts file. I'm using VSCode and Debugger for Chrome extension.

Here is my vscode launch file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome",
            "url": "http://localhost:5000",
            "sourceMaps": true, 
            "webRoot": "${workspaceRoot}"        
        }
    ]
}

Here is my tsconfig.json file:

{
  "pile": true,
  "ments":true,
  "module": "none",
  "target": "es5",
  "sourceMap": true,
  "sourceRoot": "",
  "mapRoot": "",
  "declaration": false
}

Inside angular ponent, I've set a breakpoint in $onInit cycle:

$onInit = () => {
  for(let i = 0; i < 5; i++) { //here I put breakpoint
    let t = i;
  }
}

Debus starts successfully (chrome opens) but nothing happens. In my editor, if I hover over breakpoint, the tooltip shows with a message: Unverified breakpoint. Breakpoint set but not yet bound

I am using 1.24.1 version of vscode.

I have a problem with debugging my angular ponent inside .ts file. I'm using VSCode and Debugger for Chrome extension.

Here is my vscode launch file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome",
            "url": "http://localhost:5000",
            "sourceMaps": true, 
            "webRoot": "${workspaceRoot}"        
        }
    ]
}

Here is my tsconfig.json file:

{
  "pile": true,
  "ments":true,
  "module": "none",
  "target": "es5",
  "sourceMap": true,
  "sourceRoot": "",
  "mapRoot": "",
  "declaration": false
}

Inside angular ponent, I've set a breakpoint in $onInit cycle:

$onInit = () => {
  for(let i = 0; i < 5; i++) { //here I put breakpoint
    let t = i;
  }
}

Debus starts successfully (chrome opens) but nothing happens. In my editor, if I hover over breakpoint, the tooltip shows with a message: Unverified breakpoint. Breakpoint set but not yet bound

I am using 1.24.1 version of vscode.

Share edited Mar 6, 2019 at 6:10 yivi 47.7k18 gold badges130 silver badges155 bronze badges asked Aug 13, 2018 at 16:31 KlarkKlark 4932 gold badges8 silver badges16 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

When using Visual Studio Code > Open Folder..., make sure you open the folder in which package.json is located.

发布评论

评论列表(0)

  1. 暂无评论