Open
Description
Steps to Reproduce
I've already opened a issue on Flutter GitHub but they weren't very useful.
When I try to lauch my application in debug mode, it seems like lauching normally. The applicaion skips all the breakpoints without any error and the application doesn't wait for debugger.
Version info
Flutter doctor:
[√] Flutter (Channel beta, v0.10.2, on Microsoft Windows [Versione 10.0.17134.345], locale it-IT)
• Flutter version 0.10.2 at C:\flutter
• Framework revision d8cbb80206 (2 weeks ago), 2018-10-26 01:30:21 -0400
• Engine revision 6c2ade9fa2
• Dart version 2.1.0-dev.8.0.flutter-bf26f760b1
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at C:\Users\strez\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[√] Android Studio (version 3.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 30.0.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[√] VS Code (version 1.28.2)
• VS Code at C:\Users\strez\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 2.20.0
[√] Connected device (1 available)
• ONEPLUS A6003 • a5e445e6 • android-arm64 • Android 9 (API 28)
Also Flutter Plugin version: 30.0.1
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jwren commentedon Nov 12, 2018
Does debugging work in the samples, but not your your own app?
If it is just your own app, have you happened to modify the main activity for Android? If for instance you modify the call to FlutterMain.ensureInitializationComplete in your Activity, see 1, to not pass the "--start-paused" Dart VM flag, then debugging won't work.
If this isn't it, the next step would be to go look in your IntelliJ logs to see if something is suspect.
Errichamonda commentedon Nov 13, 2018
The debug works on other project.
In the MainActivity.java there is nothing except the usual super.onCreate and GeneratedPluginRegistrant.registerWith(this);
By the way the debugging stopped working in that particular project when I upgraded the flutter plugin from 29.* to 30.*
The debug seems to work only on the first subfolder of 'lib'. Going deeper it seems like the debugger can't see the breakpoints.
devoncarew commentedon Nov 13, 2018
@Errichamonda, if you hot reload or restart your app, are breakpoints hit then? Have you modified the native code of the app, or just Flutter/Dart code?
Does this also repro if you create a new (default) Flutter project?
Thanks in advance for the answers!
Errichamonda commentedon Nov 13, 2018
With flutter clean, hot reload or restart it doesn't hit breakpoints. I've modified only the Flutter Code. Nothing on Manifest, Gradle Settings or other Android folder.
With other project, like the default one that Android Studio creates, the breakpoints works. Only in this application. Probably because the file is nested inside folders.
devoncarew commentedon Nov 13, 2018
Ah! We may be having path issues. Is the app something you can share with us, or a minimal repro that has the same project structure?
Errichamonda commentedon Nov 14, 2018
Hi, I've recreated the project with the minimum files to reproduce the problem. https://github.com/Errichamonda/DebuggerTest
I've added a breakpoint to the line 17 of lib/ui/main/gallery/main.dart
devoncarew commentedon Nov 14, 2018
Thanks for the repro case!
I cloned it, added in some necessary iOS files, and opened it in IntelliJ (from the cli, via
idea .
).I was able to set and hit breakpoints (in order around line 19 of the above file, and in the setState closure). I'm not sure what's going on in your case, but you may try re-creating the project and see if that helps.
Errichamonda commentedon Nov 14, 2018
Oh well, I see now that GitHub removed something from the code, I tried with the breakpoint at line 13
devoncarew commentedon Nov 14, 2018
OK, that breakpoint worked for me as well.
spagni commentedon Jan 27, 2019
Hi @Errichamonda! Did you find any solution for this issue? I having the same problems where the breakpoints are not being hit. With other flutter projects it works fine. Is this only project that I can't debug
VyasPrachi commentedon Apr 24, 2019
Hello,
Please give me any solution, My breakpoint is not hit in VS code and Android studio.
Errichamonda commentedon Apr 26, 2019
@spagni @VyasPrachi Sorry, the problem disappeared after some times and after I changed the project structure to have less subfolder. Probably it's a folder/file name problem.
achtelik commentedon Feb 1, 2020
Hi,
thank you @Errichamonda . I had the same problem and it seems so, that it is realy a naming problem.
I had the class MarkdownSplitter inside the following path:
'package:developer_guide/widgets/MarkdownWidget/MarkdownSplitter.dart'
Yes, the name of the folder was "MarkdownWidget" and the filename "MarkdownSplitter.dart".
I wasn't able to debug it via IntelliJ, it only worked via the DevTools webpage.
After changing the folder and file names to the following, the debugging is working via IntelliJ.
'package:developer_guide/widgets/markdown_widget/markdown_splitter.dart'
My flutter doctor:
`[√] Flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [Version 10.0.18362.592], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.4)
[√] IntelliJ IDEA Ultimate Edition (version 2019.3)
[!] VS Code (version 1.38.1)
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (1 available)
! Doctor found issues in 1 category.`
krupalbhardiya commentedon Mar 20, 2020
Build: AI-192.7142.36.36.6241897, 202002270544,
AI-192.7142.36.36.6241897, JRE 1.8.0_212-release-1586-b04x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080
AS: 3.6.1; Kotlin plugin: 1.3.61; Android Gradle Plugin: 3.6.1; Gradle: 5.6.4; NDK: from local.properties: (not specified), latest from SDK: 21.0.6113669; LLDB: LLDB 3.1 (revision: 3.1.4508709); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: (not found)
IMPORTANT: Please read https://developer.android.com/studio/report-bugs.html carefully and supply all required information.
Hi,
I am facing a probable bug in Android Studio with debugger in Flutter Projects.
I have flutter project running with multiple flavors. Flavors are configured in Run configurations and they are running accordingly.
Scenario and readings:
Waiting for a connection from Flutter on Android SDK built for x86 64...
Could not find an option named "flavor".
Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.
In any of the scenario, Android Studio cannot attach the debugger in the Device where App is already running.
For the note: Debugger is running accordingly when App is directly run from Debug Option(Shift + F9) (instead of Run Option - Shift + F10).
rodolfoizidoro commentedon Apr 19, 2020
@krupalbhardiya I have the same problem, do you discovered any solution?
krupalbhardiya commentedon Apr 20, 2020
@rodolfoizidoro no solution yet.
acoutts commentedon Jun 1, 2020
I'm also experiencing this in VSCode.
danielgomezrico commentedon Feb 25, 2021
This is still happening on plugin
53.1.5
and intellij2020.3.2
, it works for iOS but not for android.Nikitae57 commentedon Jan 26, 2022
Still happens to me
Bes79 commentedon Mar 3, 2022
Same issue on all projects on Android and Web. On web breakpoint mark converts from red round to white stop signal.
RudreshNarwal commentedon Jun 1, 2023
Facing same issue on web and android
tieorange commentedon Jul 8, 2024
Still the same issue on Android studio and vscode on the latest Flutter version
MartinHlavna commentedon Mar 24, 2025
I am also experiencing this for packages.