Toll Free: +1-855-656-NUVI

Debugging NativeScript Apps in iOS Simulator

Debugging NativeScript Apps in iOS Simulator
  • Share:

Let’s face it, deploying to a device just to have the ability to debug your NativeScript app is so 4 months ago. I just wanted to write a quick entry on debugging a NativeScript app while running it on the iOS simulator. So hopefully searching for how to debug a NativeScript app on the simulator, or a combination of those words will help someone out next time they need help, as I did.

 

Versions used in this post 
  • NativeScript: 1.1.2

 

If you’re using the NativeScript CLI and not AppBuilder, debugging your app while running on the iOS Simulator has only been available recently. The command to do so has been elusive and not exactly straightforward to figure out either.

 

Follow your standard workflow for creating and configuring a NativeScript app as well as adding the iOS platform to your app.

 

And when you’re ready to debug on using the iOS simulator… drumroll, please…

tns debug ios --debug-brk --emulator

This will spin up the iOS Simulator and Safari as well as attach Safari’s a debugger to your code like in the screenshot below.

NativeScript_Debugging_iOS_Simulator_1

Well done! Now go debug some code.

Alexander Ziskind
Alexander Ziskind

From the latest tech in web development to the latest electronic music hardware and software, Alex loves to get his hands on new stuff and hack on it. Follow this feed on Nuvious related news; so web and cloud stuff here.

Leave your comment