Try to install ts-node
as a dev dependency in your project.
It appears it’s not getting loaded as intended from the extension’s node_modules, I think it may have to do with the fact that we install it as a dev dependency ourselves and it doesn’t get installed when you install the extension.
await vscode.commands.executeCommand("workbench.action.focusFirstEditorGroup")
} else {
await vscode.commands.executeCommand("workbench.action.splitEditorLeft")
}
const baseConfig = await getBaseConfiguration()
// So this can be used with the TypeScript SDK
if (process.env.TEMPORAL_DEBUGGER_EXTENSION_DEV_MODE) {
baseConfig.skipFiles.push("${workspaceFolder}/packages/worker/src/**")
}
// NOTE: Adding NODE_PATH below in case ts-node is not an installed dependency in the workspace.
// From https://nodejs.org/api/modules.html#loading-from-the-global-folders:
// > Node.js will search those paths for modules **if they are not found elsewhere**.
// Our NODE_PATH will only be used as a fallback which is what we want.
const delim = os.platform() === "win32" ? ";" : ":"
const pathPrefix = process.env.NODE_PATH ? `${process.env.NODE_PATH ?? ""}${delim}` : ""
await vscode.debug.startDebugging(workspace, {
...baseConfig,
args: [replayerEndpoint],
env: {
TEMPORAL_DEBUGGER_PLUGIN_URL: this.server.url,
1 Like