Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Specified argument was out of the range of valid values. (Parameter 'index') #7722

Closed
3 tasks done
virusbear opened this issue Apr 19, 2024 · 3 comments
Closed
3 tasks done
Labels
accepted ships-in-future-update The issue is fixed in our 'master' branch and will ship in the next PREVIEW release snapshot debugger

Comments

@virusbear
Copy link

virusbear commented Apr 19, 2024

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.

image

DebuggerServices_13.0.14.54431.log
DebuggerServices_14.0.15.3709.log

2. To Reproduce
Steps to reproduce the behavior:

  1. Create an empty extension with the app.json content listed below
  2. Initialize a snapshot debugging session
  3. Finish the snapshot debugging session after executing the required actions in the web client
  4. 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:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

Internal work item: AB#538643

@kalberes
Copy link
Contributor

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

@virusbear
Copy link
Author

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.

  1. remove the .alpackages folder from the project
  2. reload window
  3. Download symbols from the environment to debug
  4. reload the window again
  5. start debugging session (initialize snapshot in this case)

Unfortunately, none of the above options helped with the situation

@JesperSchulz JesperSchulz added the ships-in-future-update The issue is fixed in our 'master' branch and will ship in the next PREVIEW release label Aug 2, 2024
@JesperSchulz
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted ships-in-future-update The issue is fixed in our 'master' branch and will ship in the next PREVIEW release snapshot debugger
Projects
None yet
Development

No branches or pull requests

4 participants