-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Open
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.111.0
- OS Version: Windows 11
Steps to Reproduce:
- Create a VSCode extension with the following JavaScript code:
function activate(context) { let seqnum = 1; const path = vscode.workspace.workspaceFolders[0].uri.fsPath; const toWatch = new vscode.RelativePattern(vscode.Uri.file(path), '.vscode/foobar.txt'); const watcher = vscode.workspace.createFileSystemWatcher(toWatch, false, true, false); context.subscriptions.push(watcher.onDidCreate(uri => { console.log(seqnum, 'onCreate', uri.fsPath); seqnum += 1; })); context.subscriptions.push(watcher.onDidDelete(uri => { console.log(seqnum, 'onDelete', uri.fsPath); seqnum += 1; })); } function deactivate() { } module.exports = { activate, deactivate }
- Launch this extension in debug mode
- Make sure a Workspace Folder is opened on Launch
- With the OS File manager or from terminal create the file
<workspace>/.vscode/foobar.txt - With the OS File manager or from terminal delete the file
<workspace>/.vscode/foobar.txt - Look in de Debug Console of the VSCode that launched the extension.
1 onCreate <workspace>\.vscode\foobar.txt 2 onCreate <workspace>\.vscode\foobar.txt 3 onDelete <workspace>\.vscode\foobar.txt 4 onDelete <workspace>\.vscode\foobar.txt - The
onCreateandonDeleteevents are received twice.
Reactions are currently unavailable