Concise error messages in VS Code

Is there a way to reduce the verbosity of error messages in VS Code notebooks?

I’m currently learning Julia, making lots of mistakes along the way, and my first impression is that Julia/VS Code horribly overreacts to every minor typo. Each time, I nearly have a heart attack, as for a brief moment I think I’ve caused some fatal error. Most error messages contain a few words that identify the actual error, followed by 30 lines of garbage.

Is there a setting somewhere that would print more elegant error messages?

1 Like

I agree with you that the error messages in VSCode/Jupyter can be frustrating because the stacktrace’s length makes it hard to follow at first. That being said, there are lots of layers going here, VSCode is picking up your run command, passing it to a notebook server, which grabs the cell you’re running, parses and compiles the code, and then executes. The stacktrace needs to capture all this because there could be a break in any of the rungs of that ladder.

Maybe someone with more expertise in the guts of error handling in Julia would know how to add some dials to turn verbosity up and down, but for now, rest assured that 99% of the time, you can look at the error message and the first few lines of the stacktrace to get all the info you need.

Sorry I don’t have a real solution :sweat_smile:

1 Like

Actually there is, sort of. You can use the “Julia Insider” extension instead of the regular “Julia” extension. The errors are concise and don’t have all the VSCode part of the stacktrace.

2 Likes