diff --git a/codetracer-python-recorder/codetracer_python_recorder/__main__.py b/codetracer-python-recorder/codetracer_python_recorder/__main__.py index 9700ebf..6982239 100644 --- a/codetracer-python-recorder/codetracer_python_recorder/__main__.py +++ b/codetracer-python-recorder/codetracer_python_recorder/__main__.py @@ -56,7 +56,7 @@ def main(argv: list[str] | None = None) -> int: sys.stderr.write("Usage: python -m codetracer_python_recorder [codetracer options] [args...]\n") return 2 - script_path = Path(unknown[0]) + script_path = Path(unknown[0]).resolve() script_args = unknown[1:] fmt = ns.format or DEFAULT_FORMAT @@ -71,7 +71,7 @@ def main(argv: list[str] | None = None) -> int: start_on_enter=script_path, ) try: - runpy.run_path(str(script_path.resolve()), run_name="__main__") + runpy.run_path(str(script_path), run_name="__main__") return 0 except SystemExit as e: # Preserve script's exit code diff --git a/codetracer-python-recorder/src/lib.rs b/codetracer-python-recorder/src/lib.rs index 3120a77..314a0ff 100644 --- a/codetracer-python-recorder/src/lib.rs +++ b/codetracer-python-recorder/src/lib.rs @@ -104,6 +104,7 @@ fn start_tracing( // Start location: prefer activation path, otherwise best-effort argv[0] let start_path: &Path = activation_path.unwrap_or(Path::new(&program)); + log::debug!("{}", start_path.display()); tracer.begin(&meta_path, &paths_path, &events_path, start_path, 1)?; // Install callbacks diff --git a/codetracer-python-recorder/src/runtime_tracer.rs b/codetracer-python-recorder/src/runtime_tracer.rs index 7a18cca..81d0ccf 100644 --- a/codetracer-python-recorder/src/runtime_tracer.rs +++ b/codetracer-python-recorder/src/runtime_tracer.rs @@ -172,7 +172,7 @@ impl Tracer for RuntimeTracer { } // Determine whether this is the activation owner's return let is_activation_return = self.activation_code_id.map(|id| id == code.id()).unwrap_or(false); - // Return value is optional per configuration + let val = self.encode_value(py, retval); TraceWriter::register_return(&mut self.writer, val); if is_activation_return {