Skip to content

Debugging Angular 2 project template causes it to hang on the device #559

Closed

Description

@vanka78bg

It seems there is some issue when trying to debug our Angular 2 project template on Android. When launching the debugger with the following command:

tns debug android

the debug tools show no scripts to debug. If we attach the debugger to an already running application with the following command:

tns debug android --start

the running application hangs on the device and eventually Android OS detects that, showing a prompt whether to terminate the application or continue waiting.
This happens when debugging with node-inspector only, so it seems to be some kind of a compatibility problem. Debugging via the V8 debug protocol, using the AppBuilder Visual Studio extension or the Visual Studio Code extension seems to work just fine.
You can find the source code of the Angular 2 project template in our repository on GitHub:
https://github.com/Icenium/Ice-Templates/tree/master/Templates/ProjectTemplates/Mobile/NativeScript/Telerik.Mobile.NS.TS.NG2.Blank. For your convenience, I have setup a project that can be used to reproduce the problem. Due to the large size of the project, including the node-modules, it cannot be attached here. You can download the project from the following repository:
https://github.com/vanka78bg/TestAngular.
Please, use the official NativeScript CLI for 2.3 when testing.

Activity

  1. Plamen5kov commented on Sep 19, 2016

    @Plamen5kov
    Contributor

    Hi @vanka78bg,
    I downloaded your test project and managed to recreate the issue.
    The problem you encountered is caused by the fact the angular app is extremely big and the debugger needs quite a lot of time to transfer the sources from the device to the browser. If you run the command: tns debug android and wait long enough (~85s), when all the source code finally arrives from the device, it'll pop up in the Sources window. We are working on improving this experience, so thank you for the feedback.

    EDIT: related to #563

  2. Plamen5kov commented on Sep 23, 2016

    @Plamen5kov
    Contributor

    Closed as duplicate of: #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions