The Wayback Machine - https://web.archive.org/web/20210816190311/https://github.com/flutter/flutter/issues/88306
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not set a breakpoint on an if statement with only a boolean variable in DevTools #88306

Open
jsroest opened this issue Aug 16, 2021 · 0 comments

Comments

@jsroest
Copy link

@jsroest jsroest commented Aug 16, 2021

It is not possible to set a breakpoint on an if statement with only a boolean variable.

image

Android Studio lets you set a breakpoint, but it will not get hit.
DevTools does not allow to set a breakpoint.

Especially with Android Studio, this is confusing, because it looks like the code where the breakpoint is on is not executed.

I suggests two fixes:

  • Do not allow to set a breakpoint in Android Studio where it is also not allowed in DevTools (to be consistent and clear to the developer).
  • Allow to set a breakpoint on an if statement with just a variable like the example.

Sample project can be found here:
https://github.com/jsroest/breakpoint_bug

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.2.1, on macOS 11.5.1 20G80 darwin-x64, locale
en-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)

• No issues found!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant