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

webview context is not set when clicking link in messages tab Query Results pane #18497

Open
Benjin opened this issue Dec 11, 2024 · 0 comments

Comments

@Benjin
Copy link
Contributor

Benjin commented Dec 11, 2024

Repros on latest main (6ce4498)

Repo:

  1. Connect to a database and open a new query tab
  2. Run a query, e.g. PRINT 'test'
  3. On the messages tab of the results pane, click the line number link

Expected:

  • print statement is highlighted in editor

Reality:

  • nothing highlighted
  • Console has error:
TypeError: Cannot read properties of undefined (reading 'queryRunner')
    at SqlOutputContentProvider.editorSelectionRequestHandler (c:\Users\me\Source\vscode-mssql\out\src\models\sqlOutputContentProvider.js:93:13)

After some investigation, it appears that the context in the link callback handler is set to the empty state version, not the correct state for that URI. Interestingly, the context is correct when the React is getting constructed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants