AL
AL copied to clipboard
Snapshot debugging via "Help & Support" doesn't work if .vscode folder exists
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:
- Open multiproject workspace
- Select project with an existing .vscode folder
- Open webclient
- Select Help&Support
- Select Attach to Session
- Select Snapshot Debugging in VS Code
- 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