# Debugging with Breakpoints

re: Version 9. I typically write concise code and make a real effort to refactor. As such debugging has tended to take care of itself.

Recently, I've needed to assemble applications of more complexity, in that it they have deeper hierarchies of functions, lots of them, and often from multiple packages. So I've started to want just a bit more debugging help.

I prefer as simple development environment as possible, so I'd like to focus on debugging with native functionality of Breakpoints, rather than debugging functions from third parties or Workbench.

I just need to see what goes on in the code.

While, several questions on the site explore strategies and tactics for debugging. I have not found a concise description of how to effectively use the Breakpoints debugging functionality accessible from the menu items:

Evaluation > Debugger Controls > Show Breakpoints Window


either on this site, on Wolfram's site, or in the Mathematica documentation.

Opening the Breakpoints debugging window doesn't tell one much.

One would expect a clear way to set up breaks and variables to watch, and a way to run code to the specified point. In particular can and how can one:

• set a series of breakpoints both at a functional level and within a function and
• step through processing, point to point?

Some examples or mini-overview?

Thx.

-
if anyone can figure how to use the above evaluation->debugger then they should get 10,000 voting points added. The above tool is the most convoluted software tool I have ever seen. I really have no idea why is it even there as it is impossible to figure out and use in any practical way. Matlab debugger is the best and easiest debugger I've seen so far. I am hoping Mathematica will one day have such an easy to use debugger integrated in it, but I am not holding my breath for that. –  Nasser Aug 24 '13 at 21:15
@Nasser -- Comforting to know, I haven't gone completely daft. Thx. –  Jagra Aug 24 '13 at 21:41
@Nasser if you highlight some part of the code (eg with ctrl-.), set a breakpoint, and evaluate the code, doesn't it then break there and display the state? –  acl Aug 24 '13 at 22:25
I commiserate. For laughs there is this page extolling the power and glory of the debugger. –  m_goldberg Aug 25 '13 at 23:14
You can fight it all you want (I surely did), but in the end Workbench is the best solution. I'm only sorry I didn't switch to WB sooner. –  Ajasja Nov 10 '13 at 21:21