Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show java errors in console in Eclipse

I did several searches and maybe I'm too new to Java development or using Eclipse but for the life of me I couldn't find an answer. Here's my issue.

Whenever I debug a class, sometimes I'll intentionally give false input to force a crash. I want the error to display in the console when the app crashes. For now, It jumps to the debug window and displays the error info in a weird format I don't like. Call me old school but I'm used to PHP coding and like the raw crash output. I want the console to display that error code and not have to fumble around the "debug" window.

I know it's possible because I'm following tutorials online and in the videos/screenshots, it will show those errors in red text in the console.

How do I enable this?

like image 637
JRad the Bad Avatar asked Nov 01 '22 06:11

JRad the Bad


1 Answers

1) Open up the 'Debug' perspective (while you're not running the application)

2) Click on the 'Breakpoints' tab (or open up the Breakpoints view)

3) Click on the icon that looks like J!

4) Uncheck 'Suspend on caught exceptions' and 'Suspend on uncaught exceptions'

Eclipse will only break into the debug perspective from this point on if you explicitly set a breakpoint in your code. Stack traces and log messages should display in the console as normal.

like image 88
Pedantic Avatar answered Nov 15 '22 04:11

Pedantic