Skip to content

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

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

Draft
wants to merge 2 commits into
base: prism
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug Prism test in LLDB",
"program": "${workspaceFolder}/bazel-out/darwin_arm64-dbg/bin/test/test_PosTests/prism_regression/keyword_self.runfiles/com_stripe_ruby_typer/test/pipeline_test_runner",
"args": [
"--single_test=com_stripe_ruby_typer/test/prism_regression/keyword_self.rb",
"--parser=prism",
],
"cwd": "${workspaceFolder}/bazel-out/darwin_arm64-dbg/bin/test/test_PosTests/prism_regression/keyword_self.runfiles",
"stopOnEntry": false,
"sourceMap": {
// `bazel info execution_root --define RUBY_PATH='/opt/rubies/3.3.4/' --config=dbg` 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": "LSP Test - Debug active test",
"type": "cppdbg",
Expand All @@ -24,4 +40,4 @@
]
}
]
}
}
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@
},
"files.exclude": {
"bazel-*": true
}
},
"bazel.commandLine.commandArgs": [
"--define",
"RUBY_PATH='/opt/rubies/3.3.4/'",
Comment on lines +36 to +37
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

],
"bazel.executable": "${workspaceFolder}/bazel",
}
Loading