How do you get the Visual Studio Code debugger to find AngularDart package files?

Issue

I’m working on AngularDart in Visual Studio code and I’m having trouble setting up breakpoints and debugging inside my package. It looks like the source maps are all relative, so the chrome debugger looks in the ${webroot}/packages/etc which doesn’t actually link back properly to the dart file.

Here’s some sample output from .scripts for Chrome Debugger:

› http://localhost:8080/packages/newton/src/routes.ddc.js
    - routes.dart (/Users/jeffward/Projects/newton/web/packages/newton/src/routes.dart)
› http://localhost:8080/packages/newton/src/routes.template.ddc.js
    - routes.template.dart (/Users/jeffward/Projects/newton/web/packages/newton/src/routes.template.dart)
› http://localhost:8080/packages/newton/src/services/requirement_service.ddc.js
    - requirement_service.dart (/Users/jeffward/Projects/newton/web/packages/newton/src/services/requirement_service.dart)

Is there a way either to get this to work?

Solution

Apparently this is a known-ish issue and there is a github issue already open for it here:
https://github.com/dart-lang/build/issues/1025

Answered By – Jeff

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.