There is an IDE option that controls this behavior. Tools, Options IDE Options, Python, "Jump to error on Exception". You can uncheck it if you want.
With that option checked, there are a number of ways to go back to the original file, (the one you executed) if an error occurs.
1. Using the traceback in the interpreter window.
When an error occurs during the execution of a script, a traceback is printed at the bottom.
Something like this:
Traceback (most recent call last):
File "C:\Temp\Python\recursive_fibo.py", line 34, in <module>
File "C:\Temp\Python\recursive_fibo.py", line 24, in main
ZeroDivisionError: division by zero
The lines starting with File can be clicked. Double clicking on a such a line will take you to the corresponding position of that file. Your original file will appear first.
2. Using the Messages Window
This also displays the traceback and double clicking a line will take you to the corresponding position. Double clicking on the first line will take you to the original file.