How to Debug during development

I am using Background Job in Blazor Server app
_backgroundJobClient.Enqueue(() => MyMethod(userStory.UserStoryID_PK.ToString(), baseURL));

MyMethod
Inside MyMethod, i have code that has a loop and an SQL statement that logs into Database.
there is some error inside mymethod, even my database code to log the error is not running.

How do i debug using breakpoint so that i can see where the error is occuring ?
Console.writeline is also not writing out anything.