You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何查看Flutter Windows应用的运行日志?

Where to Find Logs for Flutter Windows Apps in VS Code

Hey there! I’ve run into this exact issue before when working on Flutter Windows apps in VS Code—let me break down all the reliable places to check for those missing logs:

1. VS Code’s Debug Console Panel

If you’re launching the app via VS Code’s debug toolbar (instead of just running flutter run -d windows in the terminal), the logs should show up here by default. Even if you did use the terminal command, sometimes the Debug Console will capture logs that the terminal misses. Just make sure you’ve selected the Windows device as your debug target in the VS Code status bar first.

2. Windows Event Viewer

Flutter Windows apps automatically write logs to the Windows Event Log. Here’s how to access them:

  • Open the Event Viewer (you can search for it in the Windows Start menu)
  • Navigate to Windows Logs > Application
  • Look for events with your app’s name as the "Source" (or sometimes labeled as "Flutter")
  • Use the Filter Current Log option to narrow down results by source or event ID for faster searching

3. Verbose Terminal Output

If running flutter run -d windows gives no logs, try adding the --verbose flag to get detailed debug output:

flutter run -d windows --verbose

This will print every step of the Flutter app’s startup, device connection, and runtime logs—super helpful if you’re trying to figure out why regular logs aren’t showing. Also, try restarting VS Code’s terminal or using a native Windows command prompt/PowerShell instead, as sometimes terminal buffering issues can hide logs.

4. Custom File Logging (For More Control)

If you need persistent logs that you can access anytime, set up custom file logging in your app. You can use the built-in print() function alongside file writing, or use packages like logger to simplify the process. For example, you could write logs to a file in the %APPDATA%\[YourAppName]\logs directory—this way, even if the terminal or Debug Console doesn’t show logs, you can always check this file.


内容的提问来源于stack exchange,提问作者Hammerhead

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.01 00:52:28