18

For some reason, flutter in VS code stopped showing errors. No runtime or exception errors. Even when I put nulls everywhere on purpose, nothing shows in the console.

The red crash screen appears on device and emulators, but nothing with the details in console output. Not a single error. This image is what I am talking about, it's gone

Anybody ran into such a thing? Thanks

5
  • How are you launching the app in VS Code? Commented Dec 27, 2020 at 9:47
  • @DannyTuppeny from the top menu bar: Run => Run without debugging. edit: also Run ==> debugging and from terminal: flutter run --release Commented Dec 27, 2020 at 16:03
  • Running from the terminal won't write any output to the Debug Console, but it should write its output to the terminal too. Do you also not see the output written to the Terminal when running there with flutter run? Can you provide a code sample and a screenshot of the error on the device? Commented Dec 27, 2020 at 20:39
  • 2
    Perhaps you shouldn't be using the --release flag - these errors will be hidden! Commented Apr 8, 2021 at 20:32
  • Problem was solved @NigelSheridan-Smith, and you are correct had that been the case, but it was a different reason. Thanks though! Commented Apr 8, 2021 at 20:33

2 Answers 2

39

In case anyone else stumbles upon this, I'll post my brain dead solution (insert face palm emoji). I couldn't figure out what was going on for a good 2-3 hours as I was getting zero output in the Debug Console tab in the terminal window. Turns out I had tried to filter the text using the filter text box. Since nothing was matching my filter text, it was showing nothing. Then I realized I had some text in the text box denoted below. Hopefully this solution saves someone else from some head scratching.

enter image description here

Sign up to request clarification or add additional context in comments.

5 Comments

Happens to the best, this is a very common cause and can easily be missed, I have added it to the answer as well. Thanks mate!
Faced the same exact thing but saw this correct answer after I figured it out. Glad I am not the only one
OMG cannot belive I did the same LOL
LMAO!! Happens to the best!!! Thank you!!
Thank you thank you. 🙏 This was my brain dead problem as well. 😅
3

Another common cause of this, is using the filter box in debug console top right corner, if you typed something by mistake, it'll only show the words containing what you typed, and hide everything else. As mentioned by @jaredbaszler.


The code was passed down by another team mate, after inspecting the MyApp state, I found this in the initState, it was logging all error and not being shown in debug console.

 @override
  void initState() {
    super.initState();
    getLocale();
    configLoading();
    FlutterError.onError = (details, {bool forceReport = false}) {
      sentry.captureException(
        exception: details.exception,
        stackTrace: details.stack,
      );
    };
  }

After removing it,I was happy to see the errors and exactly where they were happening. I discovered this a couple of months ago, and posted the answer in case anybody might run into it. Now it seems easy and makes sense, but I missed it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.