Android Studio IDE: how to debug through my code only in Flutter?

1.4k views Asked by At

In Android Studio, I want to debug only my code, but step in to keep taking into dependency library. I see question , also , but they don't solve the problem. I could not find a way to not debug into message_codecs.dart, message_codecs.dart or method_channel_firebase_auth.dart (firebase_auth_platform_interface-1.1.2). I also looked that I can disable or enable all exception , but that is what I don't want.

I simply don't want to step in to these system( dependencies) library. Please let me know if there is any solution.

4

There are 4 answers

3
loganrussell48 On

When you're debugging and the code on the next line will go into something that you didn't write, Step-Over instead of Step-Into.

Step-Over will execute until the call stack is in the same state and the line you were on has finished execution.

0
Peter On

In vscode you can configure it with "Dart: Debug External Libraries" enter image description here

4
Tomas Baran On
  1. Go to VS Code user settings. On mac you get to VS Code settings by clicking CMD + , 2A. Then you search for debugSdkLibraries and dart.debugExternalLibraries and make sure they are unchecked.

enter image description here

enter image description here

2B. Or you can edit your settings in JSON file by adding this:

"dart.debugSdkLibraries": false,
"dart.debugExternalLibraries": false,

E.g. here is my full settings file: https://gist.github.com/tomasbaran/cd0ba7cadec4466356d1dc0faa14f1e2

0
Tanuj On
  1. Right click on a Breakpoint.
  2. Click on "More"
  3. Uncheck "Dart Exception Breakpoint" checkbox

Added screenshot below for reference.

https://i.stack.imgur.com/GdMnp.png