flutter / flutter/flutter-intellij
Inspect doesn't show anything in Android Studio
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
I'll just copy this from https://github.com/flutter/flutter/issues/138600 as suggested.
### Is there an existing issue for this?
- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)
### Steps to reproduce
1. Open Android Studio
2. import 'dart:developer';
3. use inspect(); in code
### Expected results
That Android Studio Console would show inspected element for deeper investigation
### Actual results
There is no sign in Android Studio about inspection. I am aware that most people use `print` in 90% cases, and am also aware of debug option, but I have cases (mostly) when I need to see detailed information about object. Pausing on breakpoint isn't always an option.
That is the biggest feature I miss from going from VSC to Android Studio. Of course Flutter DevTools does show inspect in its console, but it would be much more convenient to have it embedded in IDE itself. The best scenario is already existing Console, acceptable scenario - if there is some way to add DevTools console into Android Studio IDE.
### Code sample
Code Sample
```dart
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'dart:developer';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
create: (context) => MyAppState(),
child: MaterialApp(
title: 'Namer App',
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),
),
home: MyHomePage(),
),
);
}
}
class MyAppState extends ChangeNotifier {
var current = WordPair.random();
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
var appState = context.watch();
inspect(appState);
return Scaffold(
body: Column(
children: [
Text('A random idea:'),
Text(appState.current.asLowerCase),
],
),
);
}
}
```
### Screenshots or Video
_No response_
### Logs
_No response_
### Flutter Doctor output
flutter doctor
```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.0 23A344 darwin-arm64, locale en-LV)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
```
Contributor guide
Assessment
This issue has not been assessed yet.