Skip to content

[Bug]: Command label “MSSQL: Execute Current Statement” does not reflect actual behavior #20348

@croblesm

Description

@croblesm

Description

The command MSSQL: Execute Current Statement currently behaves as Execute selected text, or execute the current statement if no selection exists.” This causes confusion for users who expect it to only execute the statement under the cursor.

Expected Behavior:
Command name and description should clearly indicate that it runs selected text if present, or current statement when nothing is selected.

Actual Behavior:
The current label (“Execute Current Statement”) implies that it always executes only the statement under the cursor, which is misleading.

Proposed Fix:
Rename the command to MSSQL: Execute Selected Text in Editor.

Steps to Reproduce

  1. Open any SQL file.
  2. Select a portion of text and run the command MSSQL: Execute Current Statement.
  3. Observe that it executes the selected text, not just the statement under the cursor.

Affected Area

  • Connection dialog (SQL Server | Azure browse/Fabric browse)
  • Query results panel
  • Query editor
  • Object Explorer
  • Table Designer
  • Schema Compare
  • Schema Designer
  • Local SQL Server Container provisioning
  • SQL database in Fabric provisioning
  • GitHub Copilot integration
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the affected area

No response

Environment Information

  • VS Code Version: Latest
  • MSSQL Extension Version: Latest
  • OS: macOS 15.7.1

Confirmation

  • I have searched existing issues and couldn't find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions