AL icon indicating copy to clipboard operation
AL copied to clipboard

Snapshot debugging via "Help & Support" doesn't work if .vscode folder exists

Open dannoe opened this issue 9 months ago • 0 comments

1. Describe the bug I tried to attach to a session via the "Help & Support" link in the webclient. After selecting the project and "Snapshot debuggin" in vscode. Nothing happend. I found this log entry in the "Extension Host" output:

2025-03-19 10:02:37.003 [error] Error: EEXIST: file already exists, mkdir 'r:\AL\MyApp\app\.vscode'
	at mkdirSync (node:fs:1373:26)
	at t.mkdirSync (node:electron/js2c/node_init:2:16209)
	at Object.<anonymous> (c:\Users\username\.vscode\extensions\ms-dynamics-smb.al-15.0.1338262\dist\extension.js:2:478171)
	at Generator.next (<anonymous>)
	at s (c:\Users\username\.vscode\extensions\ms-dynamics-smb.al-15.0.1338262\dist\extension.js:2:476145)

I renamed the .vscode directory and retried it. This time a launch.json. was created inside a new .vscode folder. There was no launch.json in the previous folder, because it was a multi project workspace managed by the workspace file.

2. To Reproduce Steps to reproduce the behavior:

  1. Open multiproject workspace
  2. Select project with an existing .vscode folder
  3. Open webclient
  4. Select Help&Support
  5. Select Attach to Session
  6. Select Snapshot Debugging in VS Code
  7. Nothing happens.

3. Expected behavior It should ignore the already existing .vscode folder.

4. Actual behavior It throws an error because the .vscode folder already exists.

5. Versions:

  • AL Language: Version: 15.0.1338262

Internal work item: AB#572443

dannoe avatar Mar 19 '25 09:03 dannoe