How to find cause of exception in a Flutter app using vscode - flutter

I am debugging my flutter application using vscode.
A unhandled exception is thrown and the execution is paused.
The callstack is only three lines deep and only contains "flutter code" so I am unable to see the cause of the exception.
Is it a way to make the callstack deeper so I can see witch line in my code that cause the exception?

Related

Flutter flutter.bat couldnt be found

I was programming in Flutter as normally today and suddendly it started giving me the following error:
sry for german language
it states that in line 1 symbol 1 of calling flutter.bat, because it couldnt be found.
The program is terminating
Flutter gives me the same error, if I call it from the Console, even shutting down the console if I try to call flutter --version from Console with Admin rights.
The Flutter console flutter_console is giving me the error that flutter_console.bat doesnt exist.
I redownloaded Flutter, changed the system Variables and also downaloaded an old version of flutter. Still nothing is working.
I hope someone can help me

I am having error just after restarting computer in flutter Error: A file can't be part of more than one library

I am having this problem since restart and i think due to auto-update package but now i am having this error. This happens when i run my code and stop before executing anything.
Launching lib\main.dart on Edge in debug mode...
/C:/src/flutter_windows_2.10.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.3.0/lib/src/firebase_app.dart: Error: A file can't be part of more than one library.
Try moving the shared declarations into the libraries, or into a new library.
/C:/src/flutter_windows_2.10.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.3.0/lib/firebase_core.dart: Context: Used as a part in this library.
/C:/src/flutter_windows_2.10.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.3.0/lib/firebase_core.dart%20: Context: Used as a part in this library.
/C:/src/flutter_windows_2.10.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.3.0/lib/src/firebase.dart: Error: A file can't be part of more than one library.
Try moving the shared declarations into the libraries, or into a new library.
/C:/src/flutter_windows_2.10.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.3.0/lib/firebase_core.dart: Context: Used as a part in this library.
/C:/src/flutter_windows_2.10.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.3.0/lib/firebase_core.dart%20: Context: Used as a part in this library.
Failed to compile application.
Exited (sigterm)
I have tried pub get, Flutter clean, flutter upgrade downgrade. Help me to resolve this error.

Using Wasm with Flutter

I'm trying to implement WASM in my Flutter app and I've been following the instructions here: https://pub.dev/packages/wasm
Everything went okay up until last point. Instead of expected print, 'dart run' results in error message: 'Invalid argument(s): Failed to load dynamic library 'C:\Users\user\StudioProjects\app5\wasmtest.dart_tool\wasm\wasmer.dll': error code 126
I tried it both in Android Studio and IntelliJ, but the result was identical.

Rider - Unity - Break on unhandled exception

How can I setup Rider so that its debugger breaks/stops whenever there is an unhandled exception? In particular, I set up assertions all over my code, I attach the Rider debugger and I hit play on Unity. I can see on the console that many of the assertions are failing, but the debugger doesn't halt and let me debug, it just continues.

Flutter Error waiting for a debug connection: Bad state: No element

I try to run flutter with CTRL+F5 in real-device but keep getting the error and blackscreen even with the simple HelloWorld App. However with the command flutter run in the terminal in VSCode, it displayed the view in device but terminal showed error as well.
Error waiting for a debug connection: Bad state: No element
Any idea how to solve the error?