3

We have developed Json rendering using existing Sitecore templates and also created JSS components from the JSS application. Somehow in between development facing some issue in code.

As a developer, looking to debug the JSS component in connected mode. Is there any way to debug, please help?

1 Answer 1

4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.