Error: Specified argument was out of the range of valid values. (Parameter 'index')
Please include the following with each issue:
1. Describe the bug
When starting a debugging session of a downloaded snapshot using the "AL: Show all snapshots" action, I am represented with the error message Specified argument was out of range of valid values. (Parameter 'index') after selecting the wanted snapshot.
DebuggerServices_13.0.14.54431.log DebuggerServices_14.0.15.3709.log
2. To Reproduce Steps to reproduce the behavior:
- Create an empty extension with the app.json content listed below
- Initialize a snapshot debugging session
- Finish the snapshot debugging session after executing the required actions in the web client
- Select the snapshot using "AL: Show all snapshots" action in VSCode
This error is not reproducible for every scenario. This is the first time we were able to observe this issue. We already tried using different installations of VS Code, on Windows 10 and Windows 11 environments. All combinations display the same error.
{
"id": "c396b8ca-0b37-4133-af07-8ec4feb9b2bd",
"name": "Debug",
"publisher": "Default publisher",
"version": "1.0.0.0",
"brief": "",
"description": "",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"dependencies": [
{
"id": "<custom app id>",
"name": "<custom app name>",
"publisher": "<custom app publisher",
"version": "0.0.0.0"
}
],
"screenshots": [],
"platform": "23.0.0.0",
"application": "23.0.0.0",
"idRanges": [
{
"from": 50000,
"to": 99999
}
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"runtime": "12.0",
"features": [
"NoImplicitWith"
]
}
the above listed app.json is a default extension we internally use for debugging purposes. This extension works in multiple environments, incl. OnPrem and SaaS customers.
3. Expected behavior A debugging session should start, stopping execution at any available and valid breakpoints.
4. Actual behavior Upon loading the debugging session the above listed error message is shown. Any further action cancels the debugging session.
5. Versions:
- AL Language: 13.0.14.54431 & 14.0.15.3709
- Visual Studio Code: 1.88.1 Commit: e170252f762678dec6ca2cc69aba1570769a5d39
- Business Central: Version: BE Business Central 23.5, SCC (Platform 23.0.18591.0 + Application 23.5.16502.16589)
- List of Visual Studio Code extensions that you have installed:
- AL Language extension for Microsoft Dynamics 365 Business Central
- AL CodeActions
- AL Formatter
- AL Toolbox
- AL Variable Helper
- AZ AL Dev Tools/AL Code Outline
- Live Share
- Peacock
- Postman
- Remote - SSH
- Remote - SSH: Editing Configuration Files
- Remote Explorer
- Todo Tree
- waldo's CRS AL Language Extension
- WSL
Final Checklist
Please remember to do the following:
-
[X] Search the issue repository to ensure you are reporting a new issue
-
[X] Reproduce the issue after disabling all extensions except the AL Language extension
-
[X] Simplify your code around the issue to better isolate the problem
Internal work item: AB#538643
Looks like a mismatch in symbols with your local file and the server file. Maybe clean your symbol cache and download symbols with the snapshot endpoint (snapshot config).
Cleaning the symbols cache was the first thing we tried. Unfortunately, the issue persisted afterward. Download was only done with the snapshot config, as this one is the only configuration available in the launch.json. The extension in question is also only used for debugging and, thus does not contain any objects. We additionally followed the below process, which we usually do when we encounter issues with debugging/symbols in general.
- remove the .alpackages folder from the project
- reload window
- Download symbols from the environment to debug
- reload the window again
- start debugging session (initialize snapshot in this case)
Unfortunately, none of the above options helped with the situation
The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25.0.22131.0 and VS Code Extension Version 14.0.1085764.
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/