Skip to content

changed scripts are not reloaded #21

Description

@thorhans

Estimated Mr. Sakamoto,

many thanks for your excellent extension, just what I was looking for.

Unfortunately, when I change the script, it is not reloaded.

I have no previous experience with VSCode plugins, but I managed to resolve the problem by adding a call to "require.resolve" in two lines in "loadAndRunMacro":

// Load the macro module into NodeRequire
delete require.cache[require.resolve(loadedMacroModulePath)];
const macroMod = require(require.resolve(macroModPath));

But it was perplexity.ai that suggested the fix and I have no idea why it works, so you'll want to review it.

Again, thanks for your work. Coming from Emacs, I can't understand why just running a few lines of script is not built into VSCode.

T. Hansen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions