'Invalid argument 'columnOrOptions' when running 'vscode.diff'

I am creating an VS extension which needs to show the difference between two files

vscode.diff - Opens the provided resources in the diff editor to compare their contents.

left - Left-hand side resource of the diff editor right - Right-hand side resource of the diff editor title - (optional) Human readable title for the diff editor columnOrOptions - (optional) Either the column in which to open or editor options, see vscode.TextDocumentShowOptions (returns) - no result

When i try to specify the column in the execute commands it fails and shows error rejected promise not handled within 1 second: Error: Invalid argument 'columnOrOptions' when running 'vscode.diff', received: 1 c:\Users\sivakub\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js:5 stack trace: Error: Invalid argument 'columnOrOptions' when running 'vscode.diff', received: 1

Here is the code

vscode.commands.executeCommand("vscode.diff", vscode.Uri.file(outputpath), vscode.Uri.file(oldOutputPath),"Current ----- Old", vscode.ViewColumn.Two);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source