Skip to content

Commit

Permalink
Update URL protocol and dbos command (#36)
Browse files Browse the repository at this point in the history
* Use IPV4 address explicitly

* Use postgresql protocol

* Revert localhost change, dbos-sdk to dbos
  • Loading branch information
qianl15 authored Jun 6, 2024
1 parent 4a6fb1d commit 6729752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/getProxyUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function getProxyUrl(cfg?: vscode.DebugConfiguration & { rootPath?:
if (!proxyLaunched) {
throw new Error("Failed to launch debug proxy", { cause: { folder: folder.uri.fsPath, debugConfig } });
}
return `http://localhost:${config.getProxyPort(folder)}`;
return `postgresql://localhost:${config.getProxyPort(folder)}`;
} catch (e) {
logger.error("getProxyUrl", e);
vscode.window.showErrorMessage(`Failed to get proxy URL`);
Expand Down
4 changes: 2 additions & 2 deletions src/startDebugging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function getDebugLaunchConfig(folder: vscode.WorkspaceFolder, workflowID: string
const debugConfigs = vscode.workspace.getConfiguration("launch", folder).get('configurations') as ReadonlyArray<vscode.DebugConfiguration> | undefined;
for (const config of debugConfigs ?? []) {
const command = config["command"] as string | undefined;
if (command && command.includes("npx dbos-sdk debug")) {
if (command && command.includes("npx dbos debug")) {
const newCommand = command.replace("${command:dbos-ttdbg.pick-workflow-id}", `${workflowID}`);
return { ...config, command: newCommand };
}
Expand All @@ -72,7 +72,7 @@ function getDebugLaunchConfig(folder: vscode.WorkspaceFolder, workflowID: string
name: `Time-Travel Debug ${workflowID}`,
type: 'node-terminal',
request: 'launch',
command: `npx dbos-sdk debug -x http://localhost:${proxyPort} -u ${workflowID}`,
command: `npx dbos debug -x postgresql://localhost:${proxyPort} -u ${workflowID}`,
preLaunchTask,
};
}

0 comments on commit 6729752

Please sign in to comment.