The extension crashes on startup with recent versions of VS Code.
Extension Host reports:
TypeError: util.isNullOrUndefined is not a function
This is caused by util.isNullOrUndefined(), which has been deprecated for years and removed from the Node.js runtime bundled with recent VS Code releases.
The offending code is here:
|
if (util.isNullOrUndefined(frame.file) && frame.address) { |
Current code:
if (util.isNullOrUndefined(frame.file) && frame.address) {
Replace it with:
if (frame.file == null && frame.address) {
or equivalently:
if ((frame.file === null || frame.file === undefined) && frame.address) {
I tested this fix on v0.3.0+
Visual Studio Code 1.129.0
Windows 11
Workaround
If the project is no longer maintained, the installed extension can be patched manually.
Edit:
%USERPROFILE%\.vscode\extensions\cl.stm8-debug-<version>\dist\extension.js
Replace:
if(p.isNullOrUndefined(t.file)&&t.address)
with:
if(t.file==null&&t.address)
Save the file and restart VS Code.
This fixes the extension for recent versions of VS Code.
The extension crashes on startup with recent versions of VS Code.
Extension Host reports:
This is caused by
util.isNullOrUndefined(), which has been deprecated for years and removed from the Node.js runtime bundled with recent VS Code releases.The offending code is here:
stm8-debug/src/DebugAdapter.ts
Line 922 in db7d05d
Current code:
Replace it with:
or equivalently:
I tested this fix on v0.3.0+
Visual Studio Code 1.129.0
Windows 11
Workaround
If the project is no longer maintained, the installed extension can be patched manually.
Edit:
Replace:
with:
Save the file and restart VS Code.
This fixes the extension for recent versions of VS Code.