ionic-team / ionic-team/vscode-ionic
source map path not currect when debugging android webview
- Vorherrschende Sprache
- TypeScript
- Sterne
- 15
- Forks
- 3
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
# vscode-ionic v1.94.2
when i click `Run->android` button , it wil build for production. so i config `vite.config.ts` to support breakpoint to debug android webview :
```json
//vite.config.ts
build:{
sourcemap:true
},
```
sure it will generate .map file , but the weird thing is the console hit an error for can't find source map. I find a whole day to find out the cause.
the outdir is defalut as `dist` dir , for the point of vite , it will eventurally generate sourcemap like below :
```
"sources":["../../src/interfaces/inspects.d.ts",...]
```
but vscode-ionic just use ${workspacePath} as its default webRoot ,so double back in sourcemap product wrong pathes!
the point is that we don't have any api to change this configurations conveniencly , now alternative to android webview debugging for temporary. vscode-ionic is awesome and really helpful ,I really wish for this tiny problem to fix soooon.😀
Beitragsleitfaden
Rechercherichtung
The report mentions vite.config.ts, the dist output, generated .map files, and the Run→android entry point. Reproduce the production build with sourcemap enabled, then inspect how the extension sets webRoot and resolves the reported source paths. Done means Android WebView debugging resolves the original sources without a source-map error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, typescript, vite, vscode
- Bereich
- devtools, mobile-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100