Skip to content

MacOS symbolic link directories break point not working #8333

@alancook

Description

@alancook

Steps to reproduce

If you have a folder that is a symbolic link you can not set a breakpoint that stops when you run debug mode the red break point turns to a delete symbol.

Ask Claude "android studio debugging dart files in linked symbolic directories not working" and you get about 10 suggestions and none of them work.

Dows any one have a work around for this issues to debug dart code in symbolically linked folders?

Expected results

Debugging stops at break point

Actual results

Ignores the break point

HOW TO CREATE A PROJECT THAT SHOWS THIS BUG

Create a new folder called "Bugs" then cd to the folder

flutter create --platforms android linkbug
Then cd .. and create a folder called "code" outside of the "linkbug" project and then link the code folder
in the lib folder of the project using

ln -s YOUR_PROJECT_PATH/Bugs/code YOUR_PROJECT_PATH/Bugs/linkbug/lib
Open the project and the the lib folder you will see the linked folder

Now create a new dart file called 'link.directory.code.dart' and copy the code below to the file

####################################

import 'package:flutter/cupertino.dart';

class LinkedCode {
// Void Function
static void codeLinkBug() {
debugPrint("This break point never works");// Place another break point here
}
}
####################################

Then Place a second break point on on line 7 debugPrint("This break point never works")

Ad the following code to the "main.dart" in the following

import 'code/link.directory.code.dart'; // Add this Import

class _MyHomePageState extends State {

int _counter = 0;

// New Code to add
@OverRide void initState() {
super.initState(); // Set a break point here
LinkedCode.codeLinkBug(); // Setting a break point codeLinkBug file will not break
}

Flutter Doctor output

[✓] Flutter (Channel stable, 3.32.6, on macOS 15.6 24G5065c darwin-arm64, locale en-PH) [560ms]
• Flutter version 3.32.6 on channel stable at /Users/alanc/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 077b4a4ce1 (5 days ago), 2025-07-08 13:31:08 -0700
• Engine revision 72f2b18bb0
• Dart version 3.8.1
• DevTools version 2.45.1

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,965ms]
• Android SDK at /Users/alanc/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment Homebrew (build 23.0.2)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [1,205ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [14ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [13ms]
• Android Studio at /Applications/Android Studio.app/Contents
• 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 21.0.6+-13368085-b895.109)

[✓] Android Studio (version 2024.3) [11ms]
• Android Studio at /Volumes/MacOS26/Applications/Android Studio.app/Contents
• 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 21.0.6+-13368085-b895.109)

[✓] VS Code (version 1.100.3) [11ms]
• VS Code at /Volumes/MacOS26/Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.112.0

[✓] Connected device (6 available) [10.1s]
• SM A146P (mobile) • R9WW40G79FH • android-arm64 • Android 14 (API 34)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator)
• CodeFab HDC iPad (wireless) (mobile) • 00008103-000A09A826BB001E • ios • iOS 26.0 23A5287g
• CodeFab HDC (wireless) (mobile) • 00008101-000649820199001E • ios • iOS 18.5 22F76
• CodeFab AJC (wireless) (mobile) • 00008120-000805860A50C01E • ios • iOS 26.0 23A5287g
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.101
! Error: Browsing on the local area network for Alan’s Apple Watch. Ensure the device is unlocked and discoverable via Bluetooth. (code -27)

[✓] Network resources [374ms]
• All expected network resources are available.

• No issues found!

linkbug.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions