Skip to content

tns debug ios --chrome keeps changing port on every livesync update #3183

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

Closed
ghost opened this issue Oct 27, 2017 · 9 comments
Closed

tns debug ios --chrome keeps changing port on every livesync update #3183

ghost opened this issue Oct 27, 2017 · 9 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 27, 2017

Hi,

Tell us about the problem

When I run "tns debug ios --chrome" or run the debug via sidekick, everytime livesync updates the app when the code is changed, the chrome devtools port changes. So you have to copy the url again after every change. When debugging android, the port is always the same.

Which platform(s) does your issue occur on?

iOS

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

  • CLI: 3.3.0
  • Cross-platform modules: 3.3.0
  • Runtime(s): 3.3.0
  • Plugin(s):
    "nativescript-pro-ui": "3.1.4",
    "nativescript-sqlite": "1.1.11",
    "nativescript-theme-core": "1.0.4",
    "tns-core-modules": "3.3.0"
  • Xcode: 9.0.1

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

run "tns debug ios --chrome"
open chrome with the provided url
change someting in the code
chrome devtools stops working until reloaded with new url from terminal

Best regards
Jacklin

@petekanev petekanev reopened this Oct 27, 2017
@petekanev
Copy link
Contributor

@recon472 I can confirm that this indeed the current behavior when debugging with Chrome on iOS.

Unfortunately currently there isn't a workaround, but we'll let you know when we've addressed it!

@snovos
Copy link

snovos commented Jan 15, 2018

I updated cli to 3.4.1 and still getting same issue

@petekanev
Copy link
Contributor

@snovos could you please share the output of the tns debug ios command?

@snovos
Copy link

snovos commented Jan 16, 2018

@Pip3r4o I was able to spin up my app and it works, but when I paste that debug chrome url im getting this
Frontend client connected. Backend socket created. Backend socket closed! Frontend socket closed! Frontend client connected. Backend socket created. Backend socket closed!

@petekanev
Copy link
Contributor

@snovos can you make sure that you are also running the 3.4.1 ios runtime, as the CLI and the runtime need to be the latest versions to benefit from the latest inspector fixes.

@snovos
Copy link

snovos commented Jan 17, 2018

@Pip3r4o

"nativescript": {
"tns-android": {
"version": "3.4.0"
},
"hooks": [
{
"type": "before-prepare",
"script": "nativescript-config.js"
}
],
"tns-ios": {
"version": "3.4.0"
}
},
"dependencies": {
"@angular/animations": "~5.1.0",
"@angular/common": "~5.1.0",
"@angular/compiler": "~5.1.0",
"@angular/core": "~5.1.0",
"@angular/forms": "~5.1.0",
"@angular/http": "~5.1.0",
"@angular/platform-browser": "~5.1.0",
"@angular/platform-browser-dynamic": "~5.1.0",
"@angular/router": "~5.1.0",
"nativescript": "^3.4.0",
"nativescript-angular": "~5.1.0",
"nativescript-feedback": "^1.0.6",
"nativescript-fingerprint-auth": "^4.0.1",
"nativescript-orientation": "^1.6.1",
"nativescript-plugin-firebase": "^4.1.1",
"nativescript-pulltorefresh": "^2.0.2",
"nativescript-secure-storage": "^2.2.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-unit-test-runner": "^0.3.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.5.2",
"tns-core-modules": "~3.4.0",
"unzip-response": "^3.0.0",
"zone.js": "~0.8.18"
},

I used same packages version as in HelloWorld boilerplate

@petekanev
Copy link
Contributor

@snovos please install the latest 3.4.1 version of the ios platform.

@sday
Copy link

sday commented Jan 30, 2018

I have the same issue with 3.4.1. Also, it doesn't stop on a line with debugger;

tns: 3.4.0
tns-ios: 3.4.1

console.log("ENTERING EVENT");
debugger;
console.log("LEAVING EVENT");

I get a new debugger port with each minor code change and it never stops on the "debugger;" line.

@sday
Copy link

sday commented Jan 30, 2018

So it wasn't immediately obvious to me how to update tns. I thought maybe tns update would do it.

this is what it really needed.
npm i -g nativescript

I stumbled on this from opening sidekick and it said I needed tns 3.4.1 and tns-ios 3.4.1. Now it opens the same debugger port during a livesync.

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

4 participants