-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Labels
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
- Ensure the AL Language extension is installed and configured.
- Assign the keybinding
Alt + Xto the commandAL: Open Externally. - Open the VS Code Explorer sidebar.
- Select (click once on) an
.rdlcfile in the Explorer to give it focus. - 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
undefinedresource when attempting to read the file system path (fsPath). - The
whenclause for the keybinding is set toworkbench.explorer.fileview.visible. Attempts to change thewhenclause (e.g., toresourceSelected) stop the error from appearing but still do not execute the command.
Internal work item: AB#616575