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

Fix debugger launch configurations when debug is not included in the bundle#779

Merged
vinistock merged 2 commits intomainfrom
vs/fix_debugger_usage_with_custom_gemfile
Sep 8, 2023
Merged

Fix debugger launch configurations when debug is not included in the bundle#779
vinistock merged 2 commits intomainfrom
vs/fix_debugger_usage_with_custom_gemfile

Conversation

@vinistock
Copy link
Copy Markdown
Member

Motivation

Closes Shopify/ruby-lsp#1749

We need to point BUNDLE_GEMFILE to our custom bundle if it exists when we are launching the debugger. Otherwise, if the debug gem is not a part of the main bundle, we won't be able to launch it.

Implementation

Started checking if the custom bundle is there and if it is we inject BUNDLE_GEMFILE into the environment.

Automated Tests

Added a test to verify that the right path is being injected.

Manual Tests

  1. Start the extension on this branch
  2. Open any project that doesn't have the debug gem in the bundle (suggestion: ruby/yarp)
  3. Verify you can launch the debugger using launch configurations
  4. Verify you can launch the debugger using code lens

@vinistock vinistock added the bugfix This PR will fix an existing bug label Sep 7, 2023
@vinistock vinistock added this to the 2023-Q3 milestone Sep 7, 2023
@vinistock vinistock self-assigned this Sep 7, 2023
@vinistock vinistock requested a review from a team as a code owner September 7, 2023 18:29
@vinistock vinistock force-pushed the vs/fix_debugger_usage_with_custom_gemfile branch from 2c7d7f7 to 9f6d468 Compare September 7, 2023 19:13
@vinistock vinistock changed the base branch from main to vs/make_tests_pass_locally September 7, 2023 19:13
@vinistock vinistock force-pushed the vs/make_tests_pass_locally branch from 2ccafce to f17c1f9 Compare September 7, 2023 19:17
@vinistock vinistock force-pushed the vs/fix_debugger_usage_with_custom_gemfile branch from 9f6d468 to 004470f Compare September 7, 2023 19:20
Base automatically changed from vs/make_tests_pass_locally to main September 7, 2023 19:52
@vinistock vinistock merged commit f55b903 into main Sep 8, 2023
@vinistock vinistock deleted the vs/fix_debugger_usage_with_custom_gemfile branch September 8, 2023 18:36
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.

Failed to launch debugger without debug gem in Gemfile.

2 participants