Attach lua debugger to current nvim editor process to trigger br at plugin's function with keyboard shortcur presses

I’m basically trying to debug a function in a TS Plugin that gets triggered by a keyboard key press and I’m planning to do it with GDB Lua.
The question is, how complicated is it?
is it possible that because the code is written in C the core executes a loaded code of the “Loaded” lua function to C thus br’s at lua doesn’t hook into keyboard press events? or I might be wrong about that…

Any tips how to attach a debugger to nvim session and set it up?