Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break on exception in pydev

Is it possible to get the pydev debugger to break on exception?

like image 800
Mat Avatar asked Jan 18 '09 17:01

Mat


People also ask

How to use breakpoints in Python?

You can insert a breakpoint with the breakpoint() function at any position in your code . This is new in Python 3.7, and is equivalent to the older import pdb; pdb. set_trace() command. # my_script.py a = int(0.1) b = 3.0 c = a + b breakpoint() # a lot of more code here...

How do you set a breakpoint in Python pdb?

It's easy to set a breakpoint in Python code to i.e. inspect the contents of variables at a given line. Add import pdb; pdb. set_trace() at the corresponding line in the Python code and execute it. The execution will stop at the breakpoint.

How do I debug in Pydev?

Now, to debug that file, you can use Shift+F9 (the editor must be focused). NOTE: if you want to re-run the last executed file, you can use F11 to debug it (if you haven't configured F11 to always launch the last launch in debug mode, make sure you read the Getting Started on Running a program).


1 Answers

This was added by the PyDev author, under Run > Manage Python Exception Breakpoints

like image 196
eacousineau Avatar answered Sep 23 '22 21:09

eacousineau