简体   繁体   中英

NPE without a stack trace

I am trying to debug a NPE.

I have used the following flag in Eclipse Run configuration: -XX:-OmitStackTraceInFastThrow

But I still dont see a stack trace in the NPE. The only line it shows is the line number of the catch statement.

Now this NPE is being thrown from deep inside the call stack and caught somewhere out. So it is a pain and time consuming to go to each inner method and put catch statements or if (blah==null) statement.

How can I get a stack trace in Eclipse?

In th Eclipse debugger, you can put a breakpoint on any given type of exception. So, as soon as the NPE will be thrown, your debugger should bring you at the exact location

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