flutter debugger does not stop on breakpoints

2,090

Just import developer package in the intended file import 'dart: developer' as dev;

Then use it as a breakpoint; as we use in javascript

dev.debugger(); // wherever you want to stop

Share:
2,090
Tabarek Ghassan
Author by

Tabarek Ghassan

Updated on December 17, 2022

Comments

  • Tabarek Ghassan
    Tabarek Ghassan over 1 year

    every time I want to debug my flutter project the debugger does not stop on the breakpoints like there are no breakpoints even so the uncached exception and all exceptions bottoms in the debugger are working

    my

    launch.json

    file

    {
        "version": "0.2.0",
        "configurations": [{
            "name": "Flutter",
            "request": "launch",
            "type": "dart",
            "program": "lib/main.dart",
            "args": [
                "--debug",
                "dev"
            ],
        }]
    }
    

    I tried the default launch.json configurations but it's didn't work

    {
            "version": "0.2.0",
        "configurations": [
            {
                "name": "Flutter",
                "request": "launch",
                "type": "dart"
            }
        ]
    }