ipython / ipython/ipython

The debugger mode of %run escapes the boundaries of a file

Open
#12,964 1 comment 0 reactions 0 assignees View on GitHub
bug magics
Dominant language
Python
Stars
16.8k
Forks
4.5k
Avg merge
1d 2h
Merged PRs (30d)
6

Description

## Steps to reproduce

* Create a `test.py` file with the contents `a = 5` in the current directory
* Execute `%run -d test.py`
* Start executing `s` (step) commands in the debugger

## Expected result
The debugger terminates after two steps, when the `test.py` script exits.

## Actual result
The debugger carries on going through IPython's internals.

## System info
Manjaro Linux, Python 3.9.4, IPython 7.22.0 (reproduces on IPython 8.0.0.dev)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.