Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tns debug android --debug-brk broken #2741

Closed
NathanaelA opened this issue Apr 26, 2017 · 6 comments
Closed

tns debug android --debug-brk broken #2741

NathanaelA opened this issue Apr 26, 2017 · 6 comments
Assignees

Comments

@NathanaelA
Copy link
Contributor

Did you verify this is a real problem by searching

yes - #2550 seems to be related, but I don't understand why you would remove it from help...

Tell us about the problem

TNS on android doesn't seem to support the debug-brk command anymore. This used to work, and still works on iOS. It is still very needed functionality, for dealing with startup issues...

Which platform(s) does your issue occur on?

Broken on Android only, iOS works great.

Please provide the following version numbers that your issue occurs with:

2.5.4 and 3.0.0.rc.2

Please tell us how to recreate the issue in as much detail as possible.

tns debug android --debug-brk

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Nope.

@petekanev
Copy link
Contributor

Hey @NathanaelA

The --debug-brk parameter is indeed not supported when debugging Android applications (2.5 and up). This is due to changes in the android runtime and the transition from node-inspector to the recommended v8-inspector, we can no longer force open an inspector tab and break at the earliest convenience (break at the first line of the first evaluated script), and instead need to ask developers to navigate to open the chrome devtools manually, at which point a handful of scripts would have executed already.

Ideally the V8 API will be used to break immediately when the first script has been parsed and wait for user action.

At the moment though a possible implementation is to pause the application on startup for several seconds as soon as the V8 VM has been initialized and listen for incoming Chrome DevTools connections.

@dtopuzov
Copy link
Contributor

dtopuzov commented May 9, 2017

@Pip3r4o Can we remove --debug-brk from tns debug android --help?

@petekanev
Copy link
Contributor

@dtopuzov Yes, certainly! It's misleading sitting there if we don't currently support the flag.

@NathanaelA

This comment was marked as abuse.

@hshristov
Copy link

I agree with @NathanaelA here. This was working (and it is still working on iOS) so better option is to fix it instead of removing the flag from --help.

@pkoleva
Copy link
Contributor

pkoleva commented May 29, 2017

Hey, @NathanaelA,

We have a fix in the latest @next of the android runtime. You could try it out and see if it covers your scenario :)

@pkoleva pkoleva closed this as completed May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants