diff --git a/src/deviceContext.ts b/src/deviceContext.ts index 400708c0..aecf4e51 100644 --- a/src/deviceContext.ts +++ b/src/deviceContext.ts @@ -148,6 +148,22 @@ export class DeviceContext implements IDeviceContext, vscode.Disposable { this._debugger = null; this._onDidChange.fire(); } + return this; + }, (reason) => { + // Workaround for change in API. + // vscode.workspace.findFiles() for some reason now throws an error ehn path does not exist + // vscode.window.showErrorMessage(reason.toString()); + // Logger.notifyUserError("arduinoFileUnhandleError", new Error(reason.toString())); + + // Workaround for change in API, populate required props for arduino.json + this._port = null; + this._board = null; + this._sketch = null; + this._configuration = null; + this._output = null; + this._debugger = null; + this._onDidChange.fire(); + return this; }); }