Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter debugger does not stop on breakpoints

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"
        }
    ]
} 
like image 244
Tabarek Ghassan Avatar asked Oct 18 '25 21:10

Tabarek Ghassan


1 Answers

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

like image 167
Rajesh Bansal Avatar answered Oct 20 '25 11:10

Rajesh Bansal