Kirkcudbright resident here.
The harbour in the town is good for crab fishing but you want to make sure the tide is on it’s way in, the best bait is a whole/partial fish tied onto strong line and dropped over the wall, leave for a few minutes and the crabs will grab onto it, head down to the fish factory on dee walk and ask for fish scraps for crab fishing. We used to have a crab fishing competition every year with the winner being the person who caught the largest crab but that’s not allowed anymore, health & safety/animal protection gone mad 😉
An alternative would be to head down to Carrick shore and explore the many rock pools where you will find crabs, shrimps, small fish etc as well as sandy beaches and good rocks for climbing about on, follow that up with a visit to Cream of Galloway for an ice cream or pop into my old workplace for kids chocolate making workshops at The Cocoa Bean Co at Twynholm.