How To Debug iOS Safari With Xcode Simulator

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • A step-by-step guide on setting up Xcode to debug websites in iOS Safari using Web Inspector on your Mac.
    And as all browsers on iOS use Safari’s rendering engine, you don’t need a different strategy to debug Chrome, Firefox, or any other browser on iOS.
    00:00 Introduction
    00:23 Install Xcode
    00:50 Open iOS Simulator
    01:47 Connect Web Inspector to iOS Simulator
    03:38 Install different versions of iOS
    04:14 Open different iOS versions in Simulator
    #css #frontend #ios #safari #iossafari #webdev #xcode #xcodesimulator #webdevelopment #iossimulator
  • НаукаНаука

Комментарии • 59

  • @CSSWeekly
    @CSSWeekly  Год назад +3

    ⚠ Update: The Xcode Simulator works precisely the same in the latest Xcode 14.3, and MacOS Ventura. There shouldn't be any differences in the steps shown in the video. ⚠

  • @zoxx972
    @zoxx972 2 года назад +3

    Amazing, nice and simple tutorial. much needed, Thank you!!

    • @CSSWeekly
      @CSSWeekly  2 года назад +1

      Thank you so much; I'm thrilled you found it helpful! 🙂

  • @HonestMarketingTips
    @HonestMarketingTips 2 года назад +2

    Cool tip, thanks for sharing this. I struggled a lot around debugging things on iPhones and different versions of iOS. This will really help ...

    • @CSSWeekly
      @CSSWeekly  2 года назад

      Thank you, I'm really glad you found it helpful! 🙂

  • @szerenajamborbence4316
    @szerenajamborbence4316 2 года назад +1

    Thank you, this was helpful!

    • @CSSWeekly
      @CSSWeekly  2 года назад

      Thank you, Szeréna! 🙏

  • @SchettinoRafael
    @SchettinoRafael 2 года назад +2

    Thank you! The video helped me a lot!

    • @CSSWeekly
      @CSSWeekly  2 года назад

      I'm really glad to hear this guide helped you, Rafael! 🙂

  • @anishdey1189
    @anishdey1189 Год назад

    Thank you, just what I needed

    • @CSSWeekly
      @CSSWeekly  Год назад

      I'm thrilled to hear it helped you, Anish! 🙂

  • @Pifagorass
    @Pifagorass Год назад

    Thanks, very informative and helpful!

    • @CSSWeekly
      @CSSWeekly  Год назад +1

      Thank you, Pranas! I'm thrilled to hear you found it informative! 🙏

  • @GoranBanina
    @GoranBanina 2 года назад +1

    Great tutorial! Tnx :)

    • @CSSWeekly
      @CSSWeekly  2 года назад

      Thank you so much, Goran! 🙏

  • @felixonomozor5647
    @felixonomozor5647 5 месяцев назад +1

    Thank you, this video just saved me from hours of debugging.

    • @CSSWeekly
      @CSSWeekly  5 месяцев назад

      I'm really happy to hear this, Felix! Thanks for watching and commenting! 🙏

  • @Vincent-ui5op
    @Vincent-ui5op 4 месяца назад +1

    Very helpful, thank you!

    • @CSSWeekly
      @CSSWeekly  4 месяца назад

      I'm glad you found it helpful, Vincent! Thanks for watching and commenting! 🙂

  • @dukensonguerrier5369
    @dukensonguerrier5369 3 месяца назад +1

    This is beyond amazing! Thank you!

    • @CSSWeekly
      @CSSWeekly  3 месяца назад +1

      You're very welcome, Dukenson! I'm glad you found it helpful! 🙂

  • @scruffy1234
    @scruffy1234 2 года назад

    so helpful thank you

    • @CSSWeekly
      @CSSWeekly  2 года назад

      I'm really glad it was helpful, Craig! 🙂

  • @mariojgt
    @mariojgt 2 года назад

    Good tutorial thanks.

    • @CSSWeekly
      @CSSWeekly  2 года назад

      Thank you so much, I'm glad you found it helpful! 🙂

  • @angelamitchell5580
    @angelamitchell5580 3 месяца назад +1

    Thank you! This was helpful! I had no idea the link in the submenu of my selected simulator was the one that opens the dev toola for it.

    • @CSSWeekly
      @CSSWeekly  3 месяца назад +1

      I'm so glad you found it helpful and that you've learned something new, Angela! 🙂
      Thanks so much for watching and commenting! 🙏

  • @swiftuai
    @swiftuai Год назад

    Thank you, you saved me!

    • @CSSWeekly
      @CSSWeekly  Год назад

      You're very welcome! I'm so glad to hear that you found it helpful! 🙂

  • @jeremyandes838
    @jeremyandes838 2 года назад

    Thank you!

    • @CSSWeekly
      @CSSWeekly  2 года назад

      You're welcome, Jeremy! I'm glad you found it helpful! 🙂

  • @Thescintest01
    @Thescintest01 Год назад

    Thanks this is really great video for bigners as well

    • @CSSWeekly
      @CSSWeekly  Год назад

      Thank you so much, Adam! I'm happy to hear this! 🙂

  • @keviincosmos
    @keviincosmos 7 месяцев назад +1

    THANKS! 👏👏

    • @CSSWeekly
      @CSSWeekly  7 месяцев назад

      You’re very welcome, Keviin! Thanks for watching and commenting! 🙂

  • @david2am
    @david2am 2 года назад +1

    Thanks!

    • @CSSWeekly
      @CSSWeekly  2 года назад

      You’re very welcome, David! 🙂

  • @leroystanislowski6092
    @leroystanislowski6092 2 года назад +2

    Thanks so much for sharing. Just a suggestion, you would probably get more views/hits on this if you add ipad and iphone to the title. This is a big game changer for my department. There are so few ways to debug a web application or website on ipad. There are only 2 other ways i know. You can log the development console in chrome on the ipad device. The other way is to connect the ipad to a macbook and use web inspector and safari. If anyone know any other ways, please reply. I'm interested to know.

    • @CSSWeekly
      @CSSWeekly  2 года назад +1

      Thank you so much for the suggestion, Leroy! 🙏
      You summed it up nicely. I'm not aware of any other ways to debug websites on iPad.

  • @wukaipeng
    @wukaipeng 2 года назад

    nice

    • @CSSWeekly
      @CSSWeekly  2 года назад

      Thanks so much, Pandy! 🙏

  • @ViktosB
    @ViktosB Год назад +1

    Is this feature still available for latest X-Code v 14 and MacOS Ventura? Does anyone knows?

    • @CSSWeekly
      @CSSWeekly  Год назад

      Yes, Viktor. It's available in the latest Xcode (14.3) in MacOS Ventura. 🙂
      So the guide is still perfectly relevant. 🙂

  • @SofiaGoyal
    @SofiaGoyal 6 месяцев назад +1

    unfortunately it's not showing the simulator website in my safari , i have tried everything, restarted everything, do u have any idea how to fix this

    • @CSSWeekly
      @CSSWeekly  6 месяцев назад +1

      Thanks for your question, Sofia. This happens sometimes to me as well, and it usually helps if i restart Safari and/or Simulator. Have you tried that?

  • @CSSWeekly
    @CSSWeekly  2 года назад +1

    Don’t forget to like and subscribe if you found the video helpful. 😉

  • @shirosanchez265
    @shirosanchez265 10 месяцев назад +1

    I'm trying to debug localhost:5000 but I keep getting this error: Error from backend: Error: Bad state: Not connected to an application.
    Does anyone knows how can I fix this?? Or is it that I can't debug localhost?

    • @CSSWeekly
      @CSSWeekly  10 месяцев назад

      This seems like a server-side issue. There is no reason you wouldn’t be able to access localhost from the simulator.
      Is localhost:5000 working if you access it from the browser?

    • @shirosanchez265
      @shirosanchez265 10 месяцев назад +1

      @@CSSWeekly Hello, thank you for your quick response. Yes, I can access localhost:5000 in the simulator, is when I open the web inspector the console shows the error I mentioned and doesn't allow me to debug

    • @shirosanchez265
      @shirosanchez265 10 месяцев назад

      @@CSSWeekly Here's the stack trace:
      Error from backend:
      Error: Bad state: Not connected to an application.
      Stack Trace:
      #0 DevHandler._handleConnection. (package:dwds/src/handlers/dev_handler.dart:273:13)
      #1 _rootRunUnary (dart:async/zone.dart:1407:47)
      #2 _CustomZone.runUnary (dart:async/zone.dart:1308:19)
      #3 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217:7)
      #4 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
      #5 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
      #6 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
      #7 _MapStream._handleData (dart:async/stream_pipe.dart:218:10)
      #8 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
      #9 _rootRunUnary (dart:async/zone.dart:1415:13)
      #10 _CustomZone.runUnary (dart:async/zone.dart:1308:19)
      #11 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217:7)
      #12 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
      #13 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
      #14 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)
      #15 _StreamController._add (dart:async/stream_controller.dart:650:7)
      #16 _StreamController.add (dart:async/stream_controller.dart:598:5)
      #17 new WebSocketImpl.fromSocket. (package:web_socket_channel/src/copy/web_socket_impl.dart:730:21)
      #18 _rootRunUnary (dart:async/zone.dart:1407:47)
      #19 _CustomZone.runUnary (dart:async/zone.dart:1308:19)
      #20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217:7)
      #21 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
      #22 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
      #23 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
      #24 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
      #25 _WebSocketProtocolTransformer._messageFrameEnd (package:web_socket_channel/src/copy/web_socket_impl.dart:319:23)
      #26 _WebSocketProtocolTransformer.add (package:web_socket_channel/src/copy/web_socket_impl.dart:218:46)
      #27 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
      #28 _rootRunUnary (dart:async/zone.dart:1407:47)
      #29 _CustomZone.runUnary (dart:async/zone.dart:1308:19)
      #30 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217:7)
      #31 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
      #32 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
      #33 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)
      #34 _StreamController._add (dart:async/stream_controller.dart:650:7)
      #35 _StreamController.add (dart:async/stream_controller.dart:598:5)
      #36 _Socket._onData (dart:io-patch/socket_patch.dart:2381:41)
      #37 _rootRunUnary (dart:async/zone.dart:1415:13)
      #38 _CustomZone.runUnary (dart:async/zone.dart:1308:19)
      #39 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217:7)
      #40 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
      #41 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
      #42 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)
      #43 _StreamController._add (dart:async/stream_controller.dart:650:7)
      #44 _StreamController.add (dart:async/stream_controller.dart:598:5)
      #45 new _RawSocket. (dart:io-patch/socket_patch.dart:1899:33)
      #46 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1356:14)
      #47 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
      #48 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
      #49 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
      #50 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:190:5)

    • @CSSWeekly
      @CSSWeekly  10 месяцев назад

      @shirosanchez265 This seems very strange. 😕
      I can't think of why it would work in Web Inspector if it works in the simulator.
      Have you tried restarting Safari and Simulator?

    • @shirosanchez265
      @shirosanchez265 10 месяцев назад +1

      @@CSSWeekly Yes, I've tried that. I also tried using Safari Tech Preview and the result is still the same

  • @calebcruz151
    @calebcruz151 Год назад

    Thanks!

    • @CSSWeekly
      @CSSWeekly  Год назад

      Thank you for watching and commenting, Caleb! 🙏