Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample launch.json config for debugging a Prism test #195

Draft
wants to merge 2 commits into
base: prism
Choose a base branch
from

Conversation

amomchilov
Copy link

Motivation

  1. Enable building a target from the Bazel VSCode extension:

    image
  2. Add a sample launch.json for visually debugging a Prism unit test:

    image

"stopOnEntry": false,
"sourceMap": {
// `bazel info execution_root` to get this path:
"/private/var/tmp/_bazel_alex/6cfcf34b544626b5ce95e8aa2935011b/execroot/com_stripe_ruby_typer": "${workspaceFolder}",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't figured out how to automatically set this by calling bzel info execution_root yet 🤔

"name": "Debug Prism test in LLDB",
"program": "${workspaceFolder}/bazel-out/darwin-dbg/bin/test/test_PosTests/prism_regression/false.runfiles/com_stripe_ruby_typer/test/pipeline_test_runner",
"args": [
"--single_test=com_stripe_ruby_typer/test/prism_regression/false.rb",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a drop-down that lets you pick an unit test in that directory, but I couldn't find an easy way to do that 😅

Comment on lines +36 to +37
"--define",
"RUBY_PATH='/opt/rubies/3.3.4/'",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workaround until we figure out how to set this from the build configs themselves

@amomchilov amomchilov force-pushed the Alex/vscode-debugging branch from 35da610 to f67e5b4 Compare October 28, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant