prophet icon indicating copy to clipboard operation
prophet copied to clipboard

after starting debugger, breakpoint is set in the build directory rather than the cartridge

Open balikian opened this issue 8 months ago • 2 comments

Describe the bug Very sorry if this might be a configuration thing with my setup, but this has been happening to me for ages. When I start debugger, sometimes, many times, the break changes to my build directory rather than my cartridge.

To Reproduce Steps to reproduce the behavior:

  1. in a cartridgle, set a breakpoint
  2. start the debugger
  3. under breakpoints, the path has changed to the build directory rather than the cartridge the break point was originally set in.

Expected behavior Breakpoint remains set on the line and file you set it at.

Screenshots originally set breakpoint: Screenshot 2023-11-09 143051_cdi

changed breakpoint after starting debugger: Screenshot 2023-11-09 143414_build

Desktop (please complete the following information): Version: 1.84.0 (user setup) Commit: d037ac076cee195194f93ce6fe2bdfe2969cc82d Date: 2023-11-01T11:29:04.398Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

Additional context To remedy, I stop the debugger and start it again. Normally, I would hit restart, but I've been having problems with that where it doesn't fully stop the instance. So now I stop it. wait a few seconds, start it again and if it happens again which it usually will, repeat until it stops happening.

balikian avatar Nov 09 '23 22:11 balikian

Hi @balikian Is there chance that your build directory contains file .project and it's considered by extension as original cartridge?

Also having two files original file and compiled file (in build directory). Is expected that original file should be opened (having in mind that Prophet doesn't support source maps)?

As workaround you may try to use option files.exclude of VS Code

SqrTT avatar Dec 21 '23 12:12 SqrTT

I do not have a .project file in my build directory. I also do not have anything in the output directory within build. Not sure where the debugger gets these build files then. Here's a screenshot of the issue:

These breakpoints are set on Home.js in a cartridge called SFCC/cdi/cartridges/app_storefront_cdi

Now I do have another folder at the same level as SFCC called "stage" that we use to deploy to stage and it has stage/SFCC/build/output/cascade/code/app_storefront_cdi/ and that has a .project file in it, but that path doesn't look like the same one in my screenshot. HnxJshA802B4Sgvn

balikian avatar Dec 21 '23 17:12 balikian