Re: Finding the line that caused an error
- To: mathgroup at smc.vnet.net
- Subject: [mg88495] Re: Finding the line that caused an error
- From: Szabolcs <szhorvat at gmail.com>
- Date: Tue, 6 May 2008 06:44:59 -0400 (EDT)
- References: <email@example.com>
On May 5, 12:15 pm, vj8usa <vj8... at yahoo.com> wrote: > Is there any way to display the specific line of code that caused an error= in Mathematica? > I'm used to working with C++ compilers that give you a line number alon= g with each error message, and I'm starting to get frustrated with Mathemati= ca. It'd be much simpler to immediately see the cause of the error instead o= f sifting through many lines of code. The Front End does highlight parsing errors. This is analogous to the error messages of a C++ compiler (static checking). For messages generated while the program is running, you could try using the "Break at messages" feature of the debugger, which will highlight the part of code that generated the message.