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

Debugger does not stop at the app initial breakpoint #1437

Closed
vchimev opened this issue Feb 1, 2016 · 6 comments
Closed

Debugger does not stop at the app initial breakpoint #1437

vchimev opened this issue Feb 1, 2016 · 6 comments

Comments

@vchimev
Copy link

vchimev commented Feb 1, 2016

Tested with {N} CLI 1.6.0-524 and tns-android 1.6.0-2016.1.29.1.

tns debug android --emulator starts successfully the node inspector, but it does not stop at the initial breakpoint set in prepareExtend.js. The same command works correctly if --emulator is not specified.

@bfattori
Copy link

bfattori commented Feb 4, 2016

Is there a workaround for this problem? Sometimes this works, most times it runs the app and doesn't launch node-inspector for Android. I have tried:

tns debug android --debug-brk --emulator

That has only managed to stop once in the inspector. Every other time it launches my app, then sits forever doing nothing. My login dialog (which should show) isn't... But when the debug worked that one time it showed up when I let the process keep running from node-inspector.

@vchimev
Copy link
Author

vchimev commented Feb 4, 2016

Can you try to leave the emulator running and execute: tns debug android? @bfattori

@bfattori
Copy link

bfattori commented Feb 4, 2016

It runs extremely slowly, but it seems to work. What happened was:

  • I launched the emulator
  • Ran tns debug android and it started the app, shut it down, then started it again. The first time, the login window showed. Second time it didn't. The inspector came up.
  • Closed my app with the "home" button
  • Re-ran my app from the application drawer. It came up, loaded the dialog, then stopped at the breakpoint I set when i clicked the "Login/Ok" button

I can use this workaround, but hoping you all can figure this out soon.

Thanks,

  • Brett

@bfattori
Copy link

bfattori commented Feb 8, 2016

Here's an interesting note...

I created a Chromium Remote Debug config for IntelliJ Idea to run the command tns debug android --emulator --debug-brk --debug-port 5858 which runs and starts the Node Inspector, as expected. This works every time. It does not debug within Idea.

Just an FYI

@vchimev
Copy link
Author

vchimev commented Feb 17, 2016

@rosen-vladimirov,

I gave a try to the 1.6.0 release candidates and here is what I got out of tns debug android --emulator:

  • on Windows it works as expected,
  • on OS X it works the first time executed (cleaned Chrome browsing data), but every next time the initial breakpoint is skipped and the app loads. Also it happened to open the node inspector twice.

tns debug android works as expected.

@vchimev vchimev modified the milestones: 1.7.0, 1.6.0 Feb 17, 2016
@rosen-vladimirov rosen-vladimirov modified the milestones: 1.6.1, 1.7.0 Feb 17, 2016
@teobugslayer teobugslayer modified the milestones: 1.6.2, 1.6.1 Feb 18, 2016
@vchimev vchimev modified the milestones: 1.7.0, 1.6.2 Mar 2, 2016
@rosen-vladimirov rosen-vladimirov modified the milestones: 2.0, 1.7.0 Mar 14, 2016
@rosen-vladimirov rosen-vladimirov modified the milestones: 2.1 (Under consideration), 2.0 Apr 18, 2016
@rosen-vladimirov rosen-vladimirov removed their assignment May 26, 2016
@enchev enchev removed this from the 2.1 milestone Jun 6, 2016
@enchev
Copy link
Contributor

enchev commented Jun 8, 2016

We changed the default behavior and debug will not longer stop on first code statement. I'm closing this.

@enchev enchev closed this as completed Jun 8, 2016
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