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

StackOverflow https://stackoverflow.com/questions/18447174

  •  26-06-2022
  •  | 
  •  

Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top