You can debug a running program.
The procedure you follow to debug a running program will depend on whether the program is local or remote.