Snapshot Debugging: VS Code "Specified argument was out of the range of valid values. (Parameter 'index')"
1. Describe the bug
- When the download of a Snapshot (.zip) has been finished and you want to start the debugging session a Visual Studio Code window appearears after a while that contains the error message "Specified argument was out of the range of valid values. (Parameter 'index')".
2. To Reproduce Steps to reproduce the behavior:
- Have the latest Visual Studio Code "AL"-extension installed
- Initialize a Snapshot
- Finisch (Download) the Snapshot
- Start the Debugging (bottom left debugging symbol).
Each of those steps do NOT work with VS Code for Windows or macOS. It works however with the old AL Language Extension 8.3.570094 (tested!). So it's a bug somewhere in a newer verison than 8.3.570094.
3. Expected behavior The Debugger should jump into the code.
4. Actual behavior Error Message "Specified argument was out of the range of valid values. (Parameter 'index')".
5. Versions:
- AL Language: v9.3.646020
- Visual Studio Code: Version: 1.69.1
- Business Central: 20.2.41144.41547
- List of Visual Studio Code extensions that you have installed: AL Language
In order to have a clue where exactly it fails :
Can you please enable verbose logging in VsCode "al.editorServicesLogLevel": "Verbose" and somehow send the DebuggerServices.log or the exception found in C:\Users
In order to have a clue where exactly it fails : Can you please enable verbose logging in VsCode "al.editorServicesLogLevel": "Verbose" and somehow send the DebuggerServices.log or the exception found in C:\Users.vscode\extensions\ms-dynamics-smb.al-\bin Don't forget to reset the settings, since the log will grow very fast very large.
Heres the logfile for the working Version (8.3.570094) DebuggerServices.log
Thanks.
What happens if you download symbols using the snapshot debug configuration? Looks like mismatch between your local symbol file and what the server knows about your file. Nevertheless, it is a bug
That does not make a difference actually. I tested the snapshot debugging on a completely new VS Code install with extension Version 8.3.570094 and it worked ( but it didn't worked with the newest version 9.3.646020 on that fresh install).
So, you have downloaded the symbols using the snapshot configuration and the same exception was thrown. The thing that it has worked previously does not really matter in this case. Many things have changed in that codebase. We will try to fix it.
First I have set some debugger points : snapshot was working fine, and could be replayed Then I have added some more dubugger points in Integration Synchronization Codeunits and tables: snapshot was successfully downloaded and coulnd't be replayed with the same error Specified argument was out of the range of valid values. (Parameter 'index')
this bug is still reproducable in version 10.1.707468