temporalio / vscode-debugger-extension

Visual Studio Code debugger plugin
https://marketplace.visualstudio.com/items?itemName=temporal-technologies.temporalio
MIT License
19 stars 8 forks source link

[Feature Request] Implement "main panel" #1

Closed bergundy closed 2 years ago

bergundy commented 2 years ago

From the proposal

This panel has 2 main functions:

Input to enter a workflow ID and optional run ID with submit button to start a debug session launching a replay worker with deadlock detection disabled. Alternatively can have a file (path) input to use a history JSON or binary file (as exported by web and tctl or downloaded with a client).

Input for setting up server credentials.

The credentials for connecting to a server should be stored in VSCode secrets storage.

The panel should be implemented as a webview (also discussed in the proposal).

Here's the rough layout: https://jsfiddle.net/61whLp45/

Note that the server configuration should probably be in a separate "tab" but we'll finalize that when we get some designer time.

Checklist:

bergundy commented 2 years ago

@rramirez77 I assigned this to you.

You will need to implement the second part of the "backend" for the UI. This is where you need to add the code: https://github.com/temporalio/vscode-debugger-plugin/blob/7bb441827bba06f911615ebf3e0a31ee2c594d5a/src/panel.ts#L117 When you get the workflowId and optional runId create a client (connect to localhost - the default - for now) and download the history from the server using this sample as reference: https://github.com/temporalio/vscode-debugger-plugin/blob/7bb441827bba06f911615ebf3e0a31ee2c594d5a/src/replay_history/replayer.ts#L7