flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.58k stars 326 forks source link

Dev tool Debugger breakpoints persist on a ghost file when refactor a folder #6183

Open TheValkDokk opened 1 year ago

TheValkDokk commented 1 year ago

Is there an existing issue for this?

Steps to reproduce

  1. Have a breakpoint, for example: lib/screens/address/address.dart and i place a breakpoint at line 10
  2. run the app as debug and open dev tool on browser then go to debugger and look at list of breakpoint
  3. refactor, rename or delete route to that file any level

Expected results

Breakpoint disappear or delete appropriately

Actual results

Debugger will still display that file and breakpoint line, persist until i recreate folders and and that file to unmark a breakpoint

Code sample

Code sample ```dart //It a dev tool bug, i recreate the bug in the repo i linked with comment ``` https://github.com/TheValkDokk/bug

Screenshots or Video

Screenshots / Video demonstration [Upload media here]

Logs

Logs ```console [Paste your logs here] ```

Flutter Doctor output

Doctor output ```console [√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.22621.963], locale en-US) • Flutter version 3.7.0 on channel stable at C:\Code\SDKs\Flutter\flutter_windows_3.3.10-stable\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b06b8b2710 (3 months ago), 2023-01-23 16:55:55 -0800 • Engine revision b24591ed32 • Dart version 2.19.0 • DevTools version 2.20.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at C:\Users\ValkDokk\AppData\Local\Android\sdk • Platform android-33, build-tools 33.0.1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.4.33213.308 • Windows 10 SDK version 10.0.22621.0 [√] Android Studio (version 2021.3) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.77.3) • VS Code at C:\Users\ValkDokk\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.62.0 [√] Connected device (5 available) • SM A715F (mobile) • R58N91GYWRB • android-arm64 • Android 13 (API 33) • SM G988N (mobile) • 127.0.0.1:61187 • android-x64 • Android 7.1.2 (API 25) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.963] • Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.86 • Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.54 [√] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```
exaby73 commented 1 year ago

Hello @TheValkDokk. Could you tell me which IDE you're using?

TheValkDokk commented 1 year ago

Hi, it's VSCode Version: 1.77.3 (user setup) Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 Date: 2023-04-12T09:16:02.548Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.22621 Sandboxed: Yes

and Dev tools is on Chrome Version 112.0.5615.86 (Official Build) (64-bit)

huycozy commented 1 year ago

Hi @TheValkDokk I can reproduce this issue on the latest stable and master channels.

After changing the file path (its parent directory name for eg), the breakpoint in VSCode can be disappeared but the breakpoint on Devtool in Debugger still persists.

Demo video https://user-images.githubusercontent.com/104349824/232024326-f9f73f83-47bb-4703-9382-cb9032550d06.mp4
flutter doctor -v (stable & master) ```bash [√] Flutter (Channel stable, 3.7.11, on Microsoft Windows [Version 10.0.19045.2728], locale en-US) • Flutter version 3.7.11 on channel stable at C:\WIP\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f72efea43c (3 days ago), 2023-04-11 11:57:21 -0700 • Engine revision 1a65d409c7 • Dart version 2.19.6 • DevTools version 2.20.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at C:\AndroidSDK • Platform android-33, build-tools 33.0.0 • ANDROID_HOME = C:\AndroidSDK • Java binary at: C:\Program Files\Android\Android Studio Electric Eel 2022.1.1\jbr\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4) • Visual Studio at D:\DOWNLOADWORK\VS2022 • Visual Studio Community 2022 version 17.4.33213.308 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2021.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) [√] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.77.3) • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.62.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2728] • Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.49 • Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.54 [√] HTTP Host Availability • All required HTTP hosts are available • No issues found! ``` ```bash [!] Flutter (Channel master, 3.10.0-5.0.pre.27, on Microsoft Windows [Version 10.0.19045.2728], locale en-US) • Flutter version 3.10.0-5.0.pre.27 on channel master at C:\WIP\flutter_master ! Warning: `flutter` on your path resolves to C:\WIP\flutter\bin\flutter, which is not inside your current Flutter SDK checkout at C:\WIP\flutter_master. Consider adding C:\WIP\flutter_master\bin to the front of your path. ! Warning: `dart` on your path resolves to C:\WIP\flutter\bin\dart, which is not inside your current Flutter SDK checkout at C:\WIP\flutter_master. Consider adding C:\WIP\flutter_master\bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision 607e6413c1 (3 hours ago), 2023-04-14 03:13:28 -0400 • Engine revision b7b2e7b742 • Dart version 3.1.0 (build 3.1.0-2.0.dev) • DevTools version 2.23.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at C:\AndroidSDK • Platform android-33, build-tools 33.0.0 • ANDROID_HOME = C:\AndroidSDK • Java binary at: C:\Program Files\Android\Android Studio Electric Eel 2022.1.1\jbr\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4) • Visual Studio at D:\DOWNLOADWORK\VS2022 • Visual Studio Community 2022 version 17.4.33213.308 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2021.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) [√] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.77.1) • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.62.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2728] • Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.49 • Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.54 [√] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```
huycozy commented 1 year ago

It seems your question is best suited for devtools, transferring the issue.