Unable to debug typescript code in Android
See original GitHub issueI’ve created a project with Ionic 4, added Capacitor to it and run the app in Android Studio. Them using Chrome “chrome://inspect/#devices” I tried to debug the app but only the transpiled javascript code is available. I cannot see my typescript code an put breakpoints in it…
Ionic:
ionic (Ionic CLI) : 4.0.5 (/home/xpto/sw/nodejs/versions/node-v8.11.3-linux-x64/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.1
@angular-devkit/core : 0.7.2
@angular-devkit/schematics : 0.7.2
@angular/cli : 6.1.2
@ionic/ng-toolkit : 1.0.5
@ionic/schematics-angular : 1.0.4
Capacitor:

capacitor (Capacitor CLI) : 1.0.0-beta.4
@capacitor/core : 1.0.0-beta.4
System:
NodeJS : v8.11.3 (/home/xpto/sw/nodejs/versions/node-v8.11.3-linux-x64/bin/node)
npm : 5.6.0
OS : Linux 4.15
I don’t know if it’s an Ionic or a Capacitor bug, so if I’ve creating it in the wrong project just let me know and I will create it in the other one 😃
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
TypeScript debugging with Visual Studio Code
Debugging TypeScript. Visual Studio Code supports TypeScript debugging through its built-in Node.js debugger and Edge and Chrome debugger.
Read more >Not able to debug in TypeScript - VS Code - Stack Overflow
I have set target to "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--remote-debugging-port=9222" in Chrome Properties.
Read more >Running and debugging TypeScript | IntelliJ IDEA ... - JetBrains
With IntelliJ IDEA, you can run and debug client-side TypeScript code and TypeScript code running in Node.js.
Read more >Debug a JavaScript or TypeScript app - Visual Studio (Windows)
To enable debugging using Visual Studio, you need to make sure that the reference(s) to your source file in the generated source map...
Read more >debugger - JavaScript - MDN Web Docs
The following example shows code where a debugger statement has been inserted, to invoke a debugger (if one exists) when the function is ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To whom it may concern, here is the approach I implemented to enable debugging with source maps support on Android devices
npx ng add ngx-build-plus
This will install the required npm package and update angular.json as required For more details please see https://github.com/manfredsteyer/ngx-build-plus
build-customization-plugin.js
in the project root directory and add the below content in this fileng build --eval-source-map --plugin ~build-customization-plugin.js
from the root directory to build the project with source maps to debug on Android devicesThis is a better approach then changing angular/cli source 😃
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.