お世話になっております。
タイトルのように Vue.js を TypeScript で書こうと思っているのですが、VS Code を使ったデバックができません。
TypeScript のコードにブレークポイントを設定し、VS Code のデバック機能で Chrome を立ち上げデバックしようとしても VS Code のブレイクポイントが
「Breakpoint set but not yet bound」
となっており、Chrome 上でコードを実行してもブレークポイントにヒットしません。
launch.json の sourceMapPathOverrides がおかしいのかとも思いましたが正直なところ何を設定すればよいのかわかりませんでした。
ご存じの方がいらっしゃればどうぞよろしくお願いいたします。
環境
- OS : Windows 10 Pro
- node : v11.11.0
- npm : 6.7.0
- vue : 3.12.1
- Visual Studio Code : 1.41.1
launch.json
json
1{ 2 "version": "0.2.0", 3 "configurations": [ 4 { 5 "type": "chrome", 6 "request": "launch", 7 "name": "vuejs: chrome", 8 "url": "http://localhost:8080", 9 "webRoot": "${workspaceFolder}/src", 10 "breakOnLoad": true, 11 "sourceMaps": true, 12 "disableNetworkCache": true, 13 "sourceMapPathOverrides": { 14 "webpack:///./src/*": "${webRoot}/*" 15 } 16 } 17 ] 18} 19
vue.config.js
js
1module.exports = { 2 productionSourceMap: false, 3 configureWebpack: { 4 devtool: 'source-map' 5 } 6}
tsconfig.json
json
1{ 2 "compilerOptions": { 3 "target": "esnext", 4 "module": "esnext", 5 "strict": true, 6 "jsx": "preserve", 7 "importHelpers": true, 8 "moduleResolution": "node", 9 "esModuleInterop": true, 10 "allowSyntheticDefaultImports": true, 11 "sourceMap": true, 12 "baseUrl": ".", 13 "types": [ 14 "webpack-env" 15 ], 16 "paths": { 17 "@/*": [ 18 "src/*" 19 ] 20 }, 21 "lib": [ 22 "esnext", 23 "dom", 24 "dom.iterable", 25 "scripthost" 26 ] 27 }, 28 "include": [ 29 "src/**/*.ts", 30 "src/**/*.tsx", 31 "src/**/*.vue", 32 "tests/**/*.ts", 33 "tests/**/*.tsx" 34 ], 35 "exclude": [ 36 "node_modules" 37 ] 38} 39

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。