Skip to content

[Windows, Android] IntelliJ does not output error log in console #8839

@Gustl22

Description

@Gustl22

If debugging on Windows in IntelliJ via Image, no error log is provided inside the IntelliJ Debug console.

Steps to reproduce:

flutter create windows_debug_example
cd windows_debug_example

Add exception in build method:

import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      home: const MyHomePage(title: 'Windows Exception Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String title;

  const MyHomePage({super.key, required this.title});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    throw Exception('Exception in build method');
  }
}

flutter run -d windows -> Outputs the error into the console ✅ -> This is working as expected (but it doesn't work inside the Debug Window)

Log from bash console
Launching lib\main.dart on Windows in debug mode...
Building Windows application...                                    21,0s
√ Built build\windows\x64\runner\Debug\windows_debug_example.exe

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _Exception was thrown building MyHomePage(dirty, state: _MyHomePageState#eb539):
Exception: Exception in build method

The relevant error-causing widget was:
  MyHomePage
  MyHomePage:file:///D:/Tmp/Coding/git/flutter/playground/windows_debug_example/lib/main.dart:13:19

When the exception was thrown, this was the stack:
#0      _MyHomePageState.build (package:windows_debug_example/main.dart:31:5)
#1      StatefulElement.build (package:flutter/src/widgets/framework.dart:5931:27)
#2      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5817:15)
#3      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5982:11)
#4      Element.rebuild (package:flutter/src/widgets/framework.dart:5529:7)
#5      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5799:5)
#6      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5973:11)
#7      ComponentElement.mount (package:flutter/src/widgets/framework.dart:5793:5)
...     Normal element mounting (234 frames)
#241    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4587:20)
#242    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7264:36)
#243    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7279:32)
...     Normal element mounting (518 frames)
#761    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4587:20)
#762    Element.updateChild (package:flutter/src/widgets/framework.dart:4059:18)
#763    _RawViewElement._updateChild (package:flutter/src/widgets/view.dart:481:16)
#764    _RawViewElement.mount (package:flutter/src/widgets/view.dart:504:5)
...     Normal element mounting (15 frames)
#779    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4587:20)
#780    Element.updateChild (package:flutter/src/widgets/framework.dart:4059:18)
#781    RootElement._rebuild (package:flutter/src/widgets/binding.dart:1822:16)
#782    RootElement.mount (package:flutter/src/widgets/binding.dart:1791:5)
#783    RootWidget.attach.<anonymous closure> (package:flutter/src/widgets/binding.dart:1744:18)
#784    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3101:19)
#785    RootWidget.attach (package:flutter/src/widgets/binding.dart:1743:13)
#786    WidgetsBinding.attachToBuildOwner (package:flutter/src/widgets/binding.dart:1419:27)
#787    WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1404:5)
#788    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:1390:7)
#792    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:12)
(elided 3 frames from class _Timer and dart:async-patch)

════════════════════════════════════════════════════════════════════════════════════════════════════

Syncing files to device Windows...                                 146ms

Flutter run key commands.
r Hot reload. 
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Windows is available at: http://127.0.0.1:58107/jhtn3MZHWQc=/
The Flutter DevTools debugger and profiler on Windows is available at: http://127.0.0.1:58107/jhtn3MZHWQc=/devtools/?uri=ws://127.0.0.1:58107/jhtn3MZHWQc=/ws

How it should be:
Clicking on the debug button should do the same in IntelliJ. ✅

How it is:
Clicking on the debug icon for Windows device in IntelliJ does not print the error in the console. ❌

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
√ Built build\windows\x64\runner\Debug\windows_debug_example.exe
Debug service listening on ws://127.0.0.1:49544/VwpVUWBkVyg=/ws
Syncing files to device Windows...

It does it for other web though:

Log Web
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
Debug service listening on ws://127.0.0.1:49521/mPsVfbJYMC4=/ws
A Dart VM Service on Chrome is available at: http://127.0.0.1:49521/mPsVfbJYMC4=
The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9100?uri=ws://127.0.0.1:49521/mPsVfbJYMC4=/ws
Debug service listening on ws://127.0.0.1:49521/mPsVfbJYMC4=/ws
Starting application from main method in: org-dartlang-app:/web_entrypoint.dart.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _Exception was thrown building MyHomePage(dirty, state: _MyHomePageState#30177):
Exception: Exception in build method

The relevant error-causing widget was:
  MyHomePage
  MyHomePage:file:///D:/Tmp/Coding/git/flutter/playground/windows_debug_example/lib/main.dart:13:19

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3  throw_
package:windows_debug_example/main.dart 31:5                                 build
package:flutter/src/widgets/framework.dart 5931:27                           build
package:flutter/src/widgets/framework.dart 5817:15                           performRebuild
package:flutter/src/widgets/framework.dart 5982:11                           performRebuild
package:flutter/src/widgets/framework.dart 5529:7                            rebuild
package:flutter/src/widgets/framework.dart 5799:5                            [_firstBuild]
package:flutter/src/widgets/framework.dart 5973:11                           [_firstBuild]
package:flutter/src/widgets/framework.dart 5793:5                            mount
...     Normal element mounting (234 frames)
package:flutter/src/widgets/framework.dart 4587:19                           inflateWidget
package:flutter/src/widgets/framework.dart 7264:36                           inflateWidget
package:flutter/src/widgets/framework.dart 7279:32                           mount
...     Normal element mounting (543 frames)
package:flutter/src/widgets/framework.dart 4587:19                           inflateWidget
package:flutter/src/widgets/framework.dart 4059:18                           updateChild
package:flutter/src/widgets/view.dart 481:16                                 [_updateChild]
package:flutter/src/widgets/view.dart 504:5                                  mount
...     Normal element mounting (15 frames)
package:flutter/src/widgets/framework.dart 4587:19                           inflateWidget
package:flutter/src/widgets/framework.dart 4059:18                           updateChild
package:flutter/src/widgets/binding.dart 1822:16                             [_rebuild]
package:flutter/src/widgets/binding.dart 1791:5                              mount
package:flutter/src/widgets/binding.dart 1744:16                             <fn>
package:flutter/src/widgets/framework.dart 3101:11                           buildScope
package:flutter/src/widgets/binding.dart 1743:12                             attach
package:flutter/src/widgets/binding.dart 1419:26                             attachToBuildOwner
package:flutter/src/widgets/binding.dart 1404:5                              attachRootWidget
package:flutter/src/widgets/binding.dart 1390:7                              <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 47:11      internalCallback

════════════════════════════════════════════════════════════════════════════════════════════════════

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.41.2, on Microsoft Windows [Version 10.0.22631.6199], locale de-DE)
[✓] Windows Version (11 Home 64-bit, 23H2, 2009)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Build Tools 2026 18.3.0)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

IntelliJ Info:

IntelliJ IDEA 2025.3.3
Build #IU-253.31033.145, built on February 20, 2026
Source revision: 212d61deaf3a8
...
Runtime version: 21.0.10+1-b1163.108 amd64 (JCEF 137.0.17)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
.NET Core v9.0.11 x64 (Server GC)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
  maven.packagesearch.enabled=false
  terminal.new.ui.reworked=true
  ide.images.show.chessboard=true
Non-Bundled Plugins:
  org.jetbrains.plugins.clion.radler (253.31033.143)
  org.jetbrains.completion.full.line (253.31033.145)
  com.floobits.unique.plugin.id (1.7.3)
  Batch Scripts Support (1.0.13)
  ru.adelf.idea.dotenv (253.31033.143)
  PythonCore (253.31033.145)
  com.jetbrains.space (253.31033.21)
  Dart (503.0.0)
  com.intellij.cmake (253.31033.143)
  com.intellij.plugins.watcher (253.28294.218)
  com.intellij.plugin.adernov.powershell (2.11.0)
  com.localizely.flutter-intl (1.18.8-2024.2)
  CMD Support (1.0.5)
  Pythonid (253.31033.145)
  com.intellij.ml.llm (253.31033.145)
  com.intellij.clion (253.31033.143)
  com.intellij.nativeDebug (253.31033.74)
  com.intellij.reactivestreams (253.31033.19)
  org.jetbrains.android (253.31033.145)
  com.android.tools.design (253.30387.20)
  io.flutter (89.0.0)
  mobi.hsz.idea.gitignore (4.5.7)
  R4Intellij (253.31033.143)
  com.jetbrains.php (253.31033.19)
  com.jetbrains.php.framework (253.28294.259)
  de.espend.idea.php.annotation (12.0.2)
Kotlin: 253.31033.145-IJ

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions