Debugging the app and server side by side

One of the benefits of using Xcode and Swift for both frontend and backend development is the ability to develop and debug both iOS and Vapor apps at the same time. To see this in action we need to do the following: 

  1. Open ShoppingListController.swift in the server project and put a breakpoint by clicking on the line number that is inside the index method, as follows:
  1. Go to the ShoppingList.swift model in our iOS project and click on the line inside the completion handler of the request so we can inspect the response we get back from the server, as follows:
  1. Trigger a request to fetch the data ...

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.