To enable debugging Prolog code from VS Code we need to implement a Debugger Extension that will communicate with the SWI-Prolog Debug Adapter Protocol server from within the IDE.
A good starting point could be an existing VS Code debugger extension, perhaps this one or this one.