简体   繁体   中英

Get Line Highlighting (or at Least a Stack Trace) for noSuchMethod Exception Dart

I'm using Dart Editor. When I accidently call a method on null, or trigger any other very common runtime error, I'd like the IDE to tell me where the exception came from. Instead it just tells me the name of the method, the arguments and the receiver of the call.

I end up having to step through the program from the entrypoint, see where it falls off, and then make a forensic guess of what might have thrown the exception.

Is there a setting that's wrong? I'm used to having my IDE take me right to the offending line, or getting a stacktrace in the console. Hunting for errors eats up a lot more time. How can I get the info I need?

In Tools > Preferences > Run and Debug you can change the policy for Breaking on exceptions . By selecting all the editor will break on every exceptions and you will be able to see stacktraces in the debugger panel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM