我嘗試了所有這些解決方案非邊界斷點 - VS Code | Chrome | Angular但都失敗了。 我還可以嘗試什么。我只想逐行除錯我的代碼。
myproject
├──.vscode
│ ├── extensions.json
│ ├── launch.json│ └── launch.json
│ └── settings.json
├──src│ ├──應用程式│ ├──資產│ ├──環境│ └ - - 樣式└── angular.jsonlaunch.json
launch.json
{
"版本": "0.2.0",
"配置"。[
{
"型別": "chrome",
"請求": "啟動"。
"name": "針對localhost啟動Chrome"。
"url": "http://localhost:4200"。
"webRoot": "${workspaceRoot}"。
"sourceMaps": true
}
]
}
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"分析": false
},
"版本": 1,
"newProjectRoot": "專案",
"專案": {
"myproject": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"spec": false,
"flat": false,
"inlineStyle": true,
"inlineTemplate": false,
"樣式": "less"
},
"@schematics/angular:application": {
"strict": true
},
"ng-alain:模塊": {
"routing": true,
"規格": false
},
"ng-alain:list": {
"規格": false
},
"ng-alain:edit": {
"spec": false,
"modal": true
},
"ng-alain:view": {
"spec": false,
"modal": true
},
"ng-alain:curd": {
"spec": false
},
"@schematics/angular:module": {
"routing": true,
"規格": false
},
"@schematics/angular:directive": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"建筑師": {
"構建"。{
"builder": "@angular-devkit/build-angular:browser",
"選項"。{
"outputPath": "dist/myproject",
"index": "src/index.html"。
"main": "src/main.ts"。
"polyfills": "src/polyfills.ts"。
"tsConfig": "tsconfig.app.json"。
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json",
{
"glob": "**/*",
"輸入"。"./node_modules/@ant-design/icons-angular/src/inline-svg/"。
"輸出"。"/assets/"
}
],
"樣式"。[
"node_modules/ng-zorro-antd/ng-zorro-antd.min.css" 。
"src/styles.less"
],
"腳本"。[],
"allowedCommonJsDependencies": [
"@antv/g2",
"ajv",
"ajv-formats",
"date-fns",
"檔案保存"
]
},
"配置"。{
"生產"。{
"fileReplacements": [
{
"替換"。"src/environments/environment.ts"。
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "全部"。
"預算"。[
{
"型別": "初始",
"maximumWarning": "2mb",
"maximumError": "3mb"
},
{
"型別": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"qas": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts"。
"with": "src/environments/environment.qas.ts"
}
],
"outputHashing": "all",
"namedChunks": false,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"開發"。{
"buildOptimizer": false,
"優化": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "生產"
},
"服務"。{
"builder": "@angular-devkit/build-angular:dev-server"。
"選項"。{
"browserTarget": "myproject:build",
"proxyConfig": "proxy/proxy.conf.json"。
"disableHostCheck": true,
"host": "0.0.0.0",
"埠": 4290,
"開放": true
},
"配置": {
"生產"。{
"browserTarget": "myproject:build:production"
},
"qas": {
"browserTarget": "myproject:build:qas"
},
"開發"。{
"browserTarget": "myproject:build:development"
}
},
"defaultConfiguration": "開發"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n"。
"選項"。{
"browserTarget": "myproject:build"
}
},
"測驗"。{
"builder": "@angular-devkit/build-angular:karma"。
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts"。
"tsConfig": "tsconfig.spec.json"。
"karmaConfig": "karma.conf.js"。
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json"
],
"樣式"。[
"src/styles.less"
],
"腳本"。[]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"選項"。{
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "myproject:serve"
},
"配置"。{
"生產"。{
"devServerTarget": "myproject:service:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint"。
"options": {
"lintFilePatterns": [
"src/**/*.ts"。
"src/**/*.html"
]
}
}
}
}
},
"defaultProject": "myproject"
}
uj5u.com熱心網友回復:
我得到了它! 我把下面的代碼添加到我的angular.json檔案中。
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"優化": false,
"namedChunks": true
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"分析": false
},
"版本": 1,
"newProjectRoot": "專案",
"專案": {
"myproject": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"spec": false,
"flat": false,
"inlineStyle": true,
"inlineTemplate": false,
"樣式": "less"
},
"@schematics/angular:application": {
"strict": true
},
"ng-alain:模塊": {
"routing": true,
"規格": false
},
"ng-alain:list": {
"規格": false
},
"ng-alain:edit": {
"spec": false,
"modal": true
},
"ng-alain:view": {
"spec": false,
"modal": true
},
"ng-alain:curd": {
"spec": false
},
"@schematics/angular:module": {
"routing": true,
"規格": false
},
"@schematics/angular:directive": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"建筑師": {
"構建"。{
"builder": "@angular-devkit/build-angular:browser",
"選項"。{
"outputPath": "dist/myproject",
"index": "src/index.html"。
"main": "src/main.ts"。
"polyfills": "src/polyfills.ts"。
"tsConfig": "tsconfig.app.json"。
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json",
{
"glob": "**/*",
"輸入"。"./node_modules/@ant-design/icons-angular/src/inline-svg/"。
"輸出"。"/assets/"
}
],
"樣式"。[
"node_modules/ng-zorro-antd/ng-zorro-antd.min.css" 。
"src/styles.less"
],
"腳本"。[],
"allowedCommonJsDependencies": [
"@antv/g2",
"ajv",
"ajv-formats",
"date-fns",
"檔案保存"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"優化": false,
"namedChunks": true
},
"配置"。{
"生產"。{
"fileReplacements": [
{
"替換"。"src/environments/environment.ts"。
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "全部"。
"預算"。[
{
"型別": "初始",
"maximumWarning": "2mb",
"maximumError": "3mb"
},
{
"型別": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"qas": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts"。
"with": "src/environments/environment.qas.ts"
}
],
"outputHashing": "all",
"namedChunks": false,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"開發"。{
"buildOptimizer": false,
"優化": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "生產"
},
"服務"。{
"builder": "@angular-devkit/build-angular:dev-server"。
"選項"。{
"browserTarget": "myproject:build",
"proxyConfig": "proxy/proxy.conf.json"。
"disableHostCheck": true,
"host": "0.0.0.0",
"埠": 4290,
"開放": true
},
"配置": {
"生產"。{
"browserTarget": "myproject:build:production"
},
"qas": {
"browserTarget": "myproject:build:qas"
},
"開發"。{
"browserTarget": "myproject:build:development"
}
},
"defaultConfiguration": "開發"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n"。
"選項"。{
"browserTarget": "myproject:build"
}
},
"測驗"。{
"builder": "@angular-devkit/build-angular:karma"。
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts"。
"tsConfig": "tsconfig.spec.json"。
"karmaConfig": "karma.conf.js"。
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json"
],
"樣式"。[
"src/styles.less"
],
"腳本"。[]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"選項"。{
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "myproject:serve"
},
"配置"。{
"生產"。{
"devServerTarget": "myproject:service:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint"。
"options": {
"lintFilePatterns": [
"src/**/*.ts"。
"src/**/*.html"
]
}
}
}
}
},
"defaultProject": "myproject"
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/316544.html
標籤:
上一篇:pldebugger擴展在哪里?
