Dart-Code / Dart-Code

Dart and Flutter support for VS Code
https://dartcode.org/
MIT License
1.5k stars 306 forks source link

This debug session is not ready yet , but my app is lunched from debug config vscode #4987

Closed heshesh2010 closed 7 months ago

heshesh2010 commented 8 months ago

when run my flutter app using debug mode on real ios device , the app is lunched and working , but the debug session is not linked to device , and when I try to open inspect widget i got this message : "This debug session is not ready yet." and stuck in this phase

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.9, on macOS 14.3.1 23D60 darwin-x64, locale en-EG) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.86.1) [✓] Connected device (3 available) [✓] Network resources

• No issues found!

DanTup commented 8 months ago

Could you confirm:

Could you also confirm whether this only happens on your physical device, or whether you can also reproduce on the simulator?

Thanks!

heshesh2010 commented 8 months ago

@DanTup

Exactly how you're launching the app (what button/key are you pressing?) hit play button in vs code in run and debug panel .

What kind of run is it (debug/profile/release)? debug

What version of the Dart extension do you have? v3.82.0

Whether you have the dart.useLegacyDebugAdapters setting set in VS Code no, this setting is not exits in setting file

What the last output in the Debug Console is after the app launches

here is , but pls note that i still got message Flutter: Lanching...

but my app already works .

Launching lib/main.dart on hesham’s iPhone in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: RZ96H224UQ Xcode build done. 255.7s You may be prompted to give access to control Xcode. Flutter uses Xcode to run your app. If access is not allowed, you can change this through your Settings > Privacy & Security > Automation. Connecting to the VM Service is taking longer than expected... Still attempting to connect to the VM Service... If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details. If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.

Whether other functionality such as Hot Reload is working? when i press hot reload the previous logs got cleared , and I got this new logs and nothing happens :

Exception attempting to connect to the VM Service: SocketException: Connection refused (OS Error: Connection refused, errno = 61), address = 192.168.100.8, port = 51501 This was attempt #50. Will retry in 0:00:01.600000.

Could you also confirm whether this only happens on your physical device, or whether you can also reproduce on the simulator?

Yes it works on iphone sumilator ios iphone 15 .

Thanks!

DanTup commented 8 months ago

Exception attempting to connect to the VM Service: SocketException: Connection refused (OS Error: Connection refused, errno = 61), address = 192.168.100.8, port = 51501

This looks like the problem - it seems like we're not connected to the VM service correctly. Could you:

Can you also confirm whether this happens only with this particular app, or do you see the same if you create a new counter app (using the Flutter: New Project command)

DanTup commented 8 months ago

Here are some similar issues that might have useful steps to try:

heshesh2010 commented 8 months ago

Exception attempting to connect to the VM Service: SocketException: Connection refused (OS Error: Connection refused, errno = 61), address = 192.168.100.8, port = 51501

This looks like the problem - it seems like we're not connected to the VM service correctly. Could you:

  • confirm which iPhone and iOS version you're using
  • provide a copy of your pubspec.yaml that lists all packages you use
  • if possibly, try with a different USB cable to see if that makes any difference

Can you also confirm whether this happens only with this particular app, or do you see the same if you create a new counter app (using the Flutter: New Project command)

confirm which iPhone and iOS version you're using : iphone 14 pro max , ios 17.3.1

provide a copy of your pubspec.yaml that lists all packages you use

`.   ---
name: siyaq
description: A new Flutter project.
publish_to: none
#version: 3.1.6+37
version: 6.3.9+70
environment:
  sdk: ">=2.19.2 <4.0.0"
dependencies:
  flutter:
    sdk: flutter
  go_sell_sdk_flutter: ^2.3.5
  timezone: ^0.9.1
  html: ^0.15.1
  flutter_widget_from_html: ^0.14.11
  socket_io_client: ^2.0.0
  agora_rtc_engine: ^6.2.6
  permission_handler: ^11.0.1
  iban: ^1.0.1
  keep_screen_on: ^3.0.0
  path_provider: ^2.0.8
  stop_watch_timer: ^3.1.0+4
  webview_flutter: ^4.4.4
  simple_gesture_detector: ^0.2.0
  omni_datetime_picker: ^1.0.7
  firebase_core: ^2.25.0
  url_launcher: ^6.1.10
  uni_links: ^0.5.1
  material_design_icons_flutter: ^7.0.7296
  roundcheckbox: ^2.0.4+1
  pin_input_text_field: ^4.1.1
  cupertino_icons: ^1.0.2
  flutter_screenutil: ^5.8.1
  introduction_screen: ^3.0.0
  easy_localization: ^3.0.0
  flutter_svg: ^2.0.5
  group_button: ^5.3.2
  flutter_staggered_grid_view: ^0.7.0
  parsed_readmore: ^0.0.6
  flutter_slidable: ^3.0.0
  percent_indicator: ^4.0.0
  dotted_border: ^2.0.0+2
  flutter_rating_bar: ^4.0.1
  pinput: ^3.0.0
  im_stepper: ^1.0.1+1
  linear_progress_bar: ^1.1.0
  gender_picker: ^1.1.0
  flutter_datetime_picker:
    git:
      url: https://github.com/HasanAlqaisi/flutter_datetime_picker.git
  badges: ^3.0.2
  get: ^4.6.6
  cached_network_image: ^3.3.1
  loading_animation_widget: ^1.2.0+1
  flutter_custom_clippers: ^2.0.0
  syncfusion_flutter_datepicker: ^24.1.46
  numberpicker: ^2.1.1
  shimmer: ^3.0.0
  country_ip: ^3.0.0
  flutter_reaction_button: ^3.0.0+3
  photo_view: ^0.14.0
  carousel_slider: ^4.1.1
  pull_to_refresh: ^2.0.0
  file_picker: ^6.1.1
  share_plus: ^7.2.2
  universal_platform: ^1.0.0+1
  collection:
  connectivity_plus: ^5.0.0
  app_settings: ^5.0.0
  screenshot: ^2.1.0
  popover: ^0.3.0
  transparent_image: ^2.0.1
  wechat_camera_picker: ^4.2.0-dev.3
  photo_manager: ^3.0.0-dev.4
  flutter_spinkit: ^5.2.0
  rounded_loading_button: ^2.1.0
  photo_manager_image_provider: ^2.1.0
  timeago: ^3.6.1
  animated_bottom_navigation_bar: ^1.3.3
  gradient_borders: ^1.0.0
  jwt_decoder: ^2.0.1
  video_trimmer: ^3.0.1
  firebase_messaging: ^14.6.9
  equatable: ^2.0.5
  better_player:
    git:
      url: https://github.com/heshesh2010/better_player
  shared_preferences: ^2.0.13
  encrypt: ^5.0.3
  flutter_branch_sdk: ^7.0.2
  image_cropper: ^5.0.0
  notification_permissions: ^0.6.1
  flutter_photo_editor:
    git:
      url: https://github.com/heshesh2010/flutter_photo_editor
  wechat_assets_picker: ^9.0.0-dev.2
  flutter_linkify: ^6.0.0
  get_it: ^7.6.0
  infinite_scroll_pagination: ^4.0.0
  http_interceptor:
    git:
      url: https://github.com/Getdriven/http_interceptor.git
      ref: feature/pool-manager
  pool: ^1.5.1
  loader_overlay: ^4.0.0
  device_preview: ^1.1.0
  image_pixels: ^3.0.2
  firebase_crashlytics: ^3.4.9
  flutter_video_info: ^1.3.1
  flutter_facebook_auth: ^6.0.4
  simple_gradient_text: ^1.3.0
  flutter_volume_controller: ^1.3.1
  sound_mode: ^3.0.0
  real_volume: ^1.0.7
dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.13.1
  flutter_native_splash: ^2.3.6
  flutter_sticky_header: ^0.6.5
  intrinsic_dimension: ^0.3.1
dependency_overrides:
  intl: ^0.18.0
  extended_image: ^8.0.1
  http: ^0.13.3
  flutter_widget_from_html_core: ^0.14.11
  win32: ^5.0.6
flutter_icons:
  android: true
  ios: true
  image_path: assets/images/ios_logo.png
  flutter_lints: ^2.0.0
flutter:
  uses-material-design: true
  assets:
    - assets/images/
    - assets/images/flags/
    - assets/svg/
    - assets/fonts/
    - shorebird.yaml
  fonts:
    - family: IBMPlexSansArabic
      fonts:
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-Thin.ttf
          weight: 100
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-ExtraLight.ttf
          weight: 200
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-Light.ttf
          weight: 300
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-Regular.ttf
          weight: 400
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-Medium.ttf
          weight: 500
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-SemiBold.ttf
          weight: 600
        - asset: assets/fonts/IBM_Plex_Sans_Arabic/IBMPlexSansArabic-Bold.ttf
          weight: 700

flutter_native_splash:
  color: "#D5D100"

  android: true
  ios: true
  fullscreen: false
  android_12:
    color: "#D5D100"
 `    )

please note that , the bug i fixed when i restarted my phone , and this bug may occurs multiple times with same usb cable , and sometimes it works without bugs .

DanTup commented 8 months ago

Thanks - some of the issues I linked above also seem to be related to Firebase, but it's not clear to me if that's related.

If the issue only occurs sometimes, then it could be something like a bad USB cable - do you have another you can try with?

I don't think there's any issue here in the Dart extension though, as the connection is all handled by Flutter. You will likely see similar errors when running from the terminal with flutter run. Unfortunately VS Code can't work correctly without a connection to the VM Service (which is provided by Flutter).

I would first try with another cable, and if that doesn't solve the issue I would read through some of the issues linked above to see if there are any solutions there.

Otherwise, it would be best to file at https://github.com/flutter/flutter/ since the error message is coming from Flutter and not something the VS Code extension would be able to fix.

Thanks!

github-actions[bot] commented 7 months ago

This issue has been marked stale because it is tagged awaiting-info for 20 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days.