If you want to debug TypeScript/Javascript code:
When you star jss start:connected
, you will get message in the console:
Debugger listening on ws://127.0.0.1:9229/6c4c93c2-ea5e-4022-8ff6-b6fb31c7157f
. It means that there is opened 9229 port, where you can attach using a debugger.
If you use Visual Studio Code, you need Run and Debug tool (Ctrl+Shift+D) and attach it to the process. For other IDEs process is the same, you need to attach to the process.
If you have a custom layout service and want to debug it when JSS app consumes it in connected mode
In Visual Studio, select Debug > Attach to Process (or press Ctrl+Alt+P). Find w3wp process and attach to it.