Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a break point in VSCode to a dart file from an imported package?

When an exception is thrown from within a dart file from an imported package VSCode will automatically open that source file to show where the exception was thrown. Once this file is open and attached to the debugger I appear to be able to add break points anywhere inside. This makes me believe it should be possible to add other files manually. I would like to open and attach other dart files to the debugger that I know are being referenced and add break points.

like image 494
Vyrotek Avatar asked Oct 26 '25 09:10

Vyrotek


1 Answers

You need to enable one or two Dart Code settings:

Add to your user settings the following:

"dart.debugExternalPackageLibraries": true,
"dart.debugSdkLibraries": true,

The first will allow debugging of pub packages; while the second will allow debugging of Flutter sdk.

like image 103
Rémi Rousselet Avatar answered Oct 28 '25 22:10

Rémi Rousselet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!