diff --git a/CHANGELOG.md b/CHANGELOG.md
index be8185a25..a66bf6ebd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Added reporting for errors raised by custom transforms (`Z3Visitor`, `CFGVisitor`)
- Ensured `SnapshotTracer` does not include the `_trace_func` stack frame
- Enabled `SnapshotTracer` to create its `output_directory` argument if it doesn't already exist
+- Changed `SnapshotTracer`'s Webstepper code line number to align with the source code line number
### 💫 New checkers
diff --git a/python_ta/debug/snapshot_tracer.py b/python_ta/debug/snapshot_tracer.py
index 0d1d95413..305dbe0f5 100644
--- a/python_ta/debug/snapshot_tracer.py
+++ b/python_ta/debug/snapshot_tracer.py
@@ -83,8 +83,7 @@ def _trace_func(self, frame: types.FrameType, event: str, _arg: Any) -> None:
**self._snapshot_args,
)
- line_number = frame.f_lineno - self._first_line + 1
- self._add_svg_to_map(filename, line_number)
+ self._add_svg_to_map(filename, frame.f_lineno)
def _add_svg_to_map(self, filename: str, line: int) -> None:
"""Add the SVG in filename to self._snapshots"""
diff --git a/tests/test_debug/snapshot_tracer_testing_snapshots/func_open_webstepper/index.html b/tests/test_debug/snapshot_tracer_testing_snapshots/func_open_webstepper/index.html
index c101db6c5..d15d045b0 100644
--- a/tests/test_debug/snapshot_tracer_testing_snapshots/func_open_webstepper/index.html
+++ b/tests/test_debug/snapshot_tracer_testing_snapshots/func_open_webstepper/index.html
@@ -7,7 +7,7 @@
-
+