ionic-team / ionic-team/vscode-ionic

source map path not currect when debugging android webview

Aperta
#204 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug fixed in webnative.dev
Lingua principale
TypeScript
Stelle
15
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

# 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.😀

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, typescript, vite, vscode
Ambito
devtools, mobile-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.