You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to Reproduce:
This is breaking our MSSQL extension - we repeatedly call the vscode.previewHtml method when executing SQL queries, as it updates the results viewer with the latest results. It was working until the most recent Insiders build at which time it stopped resolving the promise and letting us hook in our code to update the result after it's been made visible and focused. Specific steps:
Write an extension that uses vscode.previewHtml, e.g.
if (this.doesResultPaneExist(resultsUri)) {
// this is called for the 2nd call and all subsequent calls
// Implicity Use existing results window by not providing a pane
previewCommandPromise = vscode.commands.executeCommand('vscode.previewHtml', resultsUri, paneTitle);
} else {
// This is called for the very first call
resultPaneColumn = this.newResultPaneViewColumn();
previewCommandPromise = vscode.commands.executeCommand('vscode.previewHtml', resultsUri, resultPaneColumn, paneTitle);
}
previewCommandPromise.then(() => {
console.log('preview promise returned successfully');
});
Execute this logic more than once
Expected:
Each time the command is called, the .then logic gets executed and message is logged to the console
Actual:
The .then logic is only called the first time. For all calls when the preview tab is open, no callback happens which means logic meant to happen after it becomes visible is not called. In our case, this means we never update results which blocks our main scenario
The text was updated successfully, but these errors were encountered:
The problem here is that subsequent calls go like this: vscode.commands.executeCommand('vscode.previewHtml', resultsUri, paneTitle); and that the last argument is a string whereas it must be a ViewColumn or undefined.
The promise correctly resolves with an argument validation error. Change the code to
previewCommandPromise.then(()=>{console.log('preview promise returned successfully');},err=>{console.log(err);});
and see this message bring printed to the console: Running the contributed command:'vscode.previewHtml' failed. Illegal argument 'column' - (optional) Column in which to preview.
The argument definition and constraints have not changed in the last 4 months, therefore closing as invalid.
Steps to Reproduce:
This is breaking our MSSQL extension - we repeatedly call the
vscode.previewHtml
method when executing SQL queries, as it updates the results viewer with the latest results. It was working until the most recent Insiders build at which time it stopped resolving the promise and letting us hook in our code to update the result after it's been made visible and focused. Specific steps:Expected:
Actual:
The text was updated successfully, but these errors were encountered: