Not able to go to the function definition with SFRA code in vs code

434 Views Asked by At

I am not able to go to the function definition while working with SFRA in vs code by any means (i.e Ctrl+Click, F12, Right Click --> Go to Definition ), In spite of having a definition it is showing as 'No definition found'.

Can anyone please help me here, I have also noticed that the suggestion coming from vs code is not having the functions or variable I created, I am working on demandware( SFRA ).

2

There are 2 best solutions below

1
On

There is one setting in VS code, Go to Setting and search for "Definition Link Opens In Peek" and tikmark the checkbox. See this screenshot.

1
On

This is possible if you install prophet debugger. Once you set it up, add your cartridge path to your dw.json file. This will do the trick.