Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Save workspace folder instead of custom workspace object in debug config #988

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes Shopify/ruby-lsp#1676

In #976, we started saving our custom Workspace objects into the debugging session configuration.

I remember testing this and it working, but I might be misremembering. It indeed causes the strange issue reported in Shopify/ruby-lsp#1676, which just opens the launch.json file instead of launching the debugger.

I tried step debugging and it leads inside VS Code internals in some serialization code. My assumption is that it serializes the configuration and something fails because our custom object must not conform to whatever interface is needed to serialize/deserialize.

Implementation

We only need the workspace folder, so let's save only that in the configuration.

Manual Tests

  1. Start the LSP on this branch
  2. Launch any debugging task from the debug and run panel
  3. It should launch the task and not open the launch.json file

@vinistock vinistock added the bugfix This PR will fix an existing bug label Jan 16, 2024
@vinistock vinistock self-assigned this Jan 16, 2024
@vinistock vinistock requested a review from a team as a code owner January 16, 2024 18:41
@vinistock vinistock merged commit 6a2839e into main Jan 16, 2024
10 checks passed
@vinistock vinistock deleted the vs/fix_debug_config_issue branch January 16, 2024 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix This PR will fix an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v0.5.6 Broken Debug Button - Opens launch.json instead of running debugger
2 participants