After working diligently on developing my first vscode extension, I encountered a roadblock when the debugger halted the execution of my extension.
As a newcomer to JavaScript, I suspect that I may be overlooking something related to "thenables" that is causing this issue. Here's what's happening:
When running my extension using keyboard shortcuts like "ctrl + alt + o", everything works smoothly. However, as soon as I modify the "activeTextEditor", I receive a "rejected promise not handled within 1 second" error in my debug console.
The problematic section appears to be this:
const checkOutHeader = (history) => {
console.log("Path: checkOutHeader");
activeTextEditor.edit((editor) => {
editor.replace(new vscode.Range(0,0,10,100), commentHeader(
populateCheckOutHeader(head.out, history).substring(1), languageId));
}).then((none)=>{
console.log("We are here!");
saveFile();
});
};
This correlates with the path logged by my extension in the debug console:
CheckoutHeader: Now active!
Path: getHeaderConfig
lang: makefile
Path: supportHeaderLanguage
Path: checkInHandler
Path: getCurrentHeader
Path: getHistoryFileStatus
Path: getHeaderHistory
Path: getHistoryFileName
Path: getHistoryFileStatus
Path: getHistoryTimeIn
Path: getHistoryInBy
Path: getHistoryTimeOut
Path: getHistoryOutBy
Path: checkInHeader
rejected promise not handled within 1 second
Although some users suggested that c++tools might be the culprit, I can confirm that I don't have that particular extension installed.
Any help would be greatly appreciated. Thank you!