AL icon indicating copy to clipboard operation
AL copied to clipboard

Snapshot Debugging: VS Code "Specified argument was out of the range of valid values. (Parameter 'index')"

Open SaschaM-Dev opened this issue 3 years ago • 8 comments

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:

  1. Have the latest Visual Studio Code "AL"-extension installed
  2. Initialize a Snapshot
  3. Finisch (Download) the Snapshot
  4. 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

SaschaM-Dev avatar Jul 15 '22 14:07 SaschaM-Dev

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.

kalberes avatar Jul 16 '22 13:07 kalberes

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.

DebuggerServices.log

SaschaM-Dev avatar Jul 18 '22 06:07 SaschaM-Dev

Heres the logfile for the working Version (8.3.570094) DebuggerServices.log

SaschaM-Dev avatar Jul 18 '22 06:07 SaschaM-Dev

Thanks.

kalberes avatar Jul 18 '22 15:07 kalberes

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

kalberes avatar Jul 19 '22 13:07 kalberes

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).

SaschaM-Dev avatar Jul 19 '22 13:07 SaschaM-Dev

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.

kalberes avatar Jul 19 '22 18:07 kalberes

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')

OlgicaA avatar Jul 20 '22 11:07 OlgicaA

this bug is still reproducable in version 10.1.707468

KosPav avatar Nov 14 '22 18:11 KosPav