How to debug code in an imported function

Dear all,

I am trying to debug a python code in JupyterLab.
The part of the code that fails consists of the main script that I have written myself and a function that I import.

At the start of the main script, I import the function like this:

from module import function1

Later in the main script, I am calling the function like this:

returnValue = function1(arg1, arg2)

The program encounters an error inside function1, and I want to print the values of the variables before the program fails. I include breakpoints in the file that contains the definition of function1, but these are ignored by the debugger.

What am I doing wrong?
How can I debug code in the main script and in the imported function?

Please tell me if you need more information to help me.

Thanks a lot for your help.