# set_trace() analog for Sage

In sage one can use `import pdb;pdb.set_trace()`

or in case of tests: `import pytest; pytest.set_trace()`

. But these commands invoke pure python console without Sage improvements.

Are there something like `sage.set_trace()`

command which opens Sage REPL instead if Python REPL?

Did you try

`import pdb;pdb.set_trace()`

in a Sage terminal ?It's no use I think. Good to have pdb when you run file like

`sage file.sage`

. But I tried and it is standard pdb without any Sage features.