Running a module in back-ground task means assigning the module to separate LUW.
To debug our background task we need to switch on Do not process in debugging mode as shown below
Once we execute our program in SE38, FM will get execute in background task and it will be assigned to a separate LUW. We can see this LUW registered in t-code SM58 and execute, debug and delete manually.
If we do not check above check box, then LUW gets execute automatically and immediately based on attribute settings at FM level. It does not wait for user to manually execute the same.
Go to SM58 and check there will be an entry for your program execution.
Now debug the LUW.
You will be now inside the FM.
After above execution process, corresponding record from SM58 will be deleted.