microsoft / microsoft/AL

Keybinding for AL: Open Externally Fails with Cannot read properties of undefined (reading 'fsPath') on RDLC Files

Open
#8,174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

Issue Description

The AL: Open Externally command works correctly when activated via the context menu (right-click) on an RDLC file in the VS Code Explorer. However, when the command is executed using its assigned keybinding (Example :Alt + X), it fails to open the file and throws a warning: Cannot read properties of undefined (reading 'fsPath'

Steps to Reproduce
  1. Ensure the AL Language extension is installed and configured.
  2. Assign the keybinding Alt + X to the command AL: Open Externally.
  3. Open the VS Code Explorer sidebar.
  4. Select (click once on) an .rdlc file in the Explorer to give it focus.
  5. Press the keybinding Alt + X.
Expected Behavior

The .rdlc file should open in the external report editor configured as default (Example: Microsoft Report Builder)

Actual Behavior

A warning notification appears with the error message:

Cannot read properties of undefined (reading 'fsPath')

The external application is not launched.

Additional Notes
  • If the command is executed by right-clicking the file and selecting "AL: Open Externally" from the context menu, it works as expected.
  • This suggests the keybinding activation logic fails to properly pass the selected file's URI/context object to the command handler, resulting in an undefined resource when attempting to read the file system path (fsPath).
  • The when clause for the keybinding is set to workbench.explorer.fileview.visible. Attempts to change the when clause (e.g., to resourceSelected) stop the error from appearing but still do not execute the command.

Internal work item: AB#616575

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the AL: Open Externally command and its keybinding configuration, then compare the keybinding invocation with the Explorer context-menu invocation. Reproduce the issue with a selected .rdlc file and verify that the command receives a defined resource URI and launches the configured external editor.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.