Getting Started with Numba and debug it

Hey guys,

Glad to join here.

I’ve tried so desperately to debug some python code I’ve written with Numba. It’s frustrating, as even prints or assertions don’t really work easily.

Tried Nsight or adding:

os.environ["NUMBA_ENABLE_CUDASIM"] = "1"
os.environ["CUDA_LAUNCH_BLOCKING"] = "1"

but it’s still a mess up.

Can anyone guide me or refer me to some really step-by-step tutorial how to debug Numba code on VSCode?

Thanks!

it depends on what you’re trying to debug, but if you just want to walk through your python code I’d suggest NUMBA_JIT_DISABLE=1

1 Like

Hold on, if I set:
NUMBA_JIT_DISABLE=1
would the code run as if with a single thread?

I try to debug where the code “breaks”.

Also, it would be nice to see an overview of the threads being orchestrated.