Ensure command args aren't parsed by rdbg#128
Conversation
|
More Context Previously, the bare command and all of its arguments were being passed directly to rdbg, without any argument separation. For example, given the following debug config: [
{
"request": "launch",
"adapter": "rdbg",
"label": "Launch Rails Server with Ruby extension (Debug)",
"command": "bin/rails server -p 8000",
"cwd": "${ZED_WORKTREE_ROOT}"
},
]The command |
| arguments.push(command.clone()); | ||
| arguments.extend(["--command".into(), "--".into(), command.clone()]); | ||
| } else if let Some(command_or_script) = &ruby_config.script_or_command { | ||
| if worktree.which(command_or_script).is_some() { |
There was a problem hiding this comment.
thought (non-blocking): I wonder why we need to check if command_or_script exists in a worktree here. We should check that later.
There was a problem hiding this comment.
From what I can tell, the requirement for command_or_script comes from the dap_config_to_scenario method. We aren't sure if what they're giving us is a script or a command, but we don't have access to the worktree in that method, so we forward it along and let the get_dap_binary deal with checking that. Agreed that we should investigate how necessary command_or_script is though.
ff40c5e to
1047379
Compare
|
Conflicts fixed! Thanks for looking at these. |
Thanks! |
Hi, this pull request updates the Ruby extension from v0.10.1 to [v0.12.0](https://github.com/zed-extensions/ruby/releases/tag/v0.12.0). Here is the list of changes for each release: ## v0.12.0 ``` What's Changed feat(ruby): add gem uninstall functionality by @vitallium in zed-extensions/ruby#135 Add support for debug locators by @Hawkbawk in zed-extensions/ruby#130 feat(ruby): Add basic support for displaying dbg variables by @vitallium in zed-extensions/ruby#125 Add snippets by @andyw8 in zed-extensions/ruby#53 fix(rdbg): Improve debugger argument handling by @vitallium in zed-extensions/ruby#136 ``` ## v0.11.0 ``` What's Changed feat(rdbg): support RUBY_DEBUG env vars for host and port by @vitallium in zed-extensions/ruby#123 feat(rdbg): support attach requests for rdbg debugger by @vitallium in zed-extensions/ruby#124 Update Rust crate serde to v1.0.219 by @renovate in zed-extensions/ruby#116 Update Rust crate serde_json to v1.0.140 by @renovate in zed-extensions/ruby#117 Ensure cwd actually has a default by @Hawkbawk in zed-extensions/ruby#127 Ensure command args aren't parsed by rdbg by @Hawkbawk in zed-extensions/ruby#128 Support Rake outlines by @joeldrapper in zed-extensions/ruby#131 ``` Thanks!
Hi, this pull request updates the Ruby extension from v0.10.1 to [v0.12.0](https://github.com/zed-extensions/ruby/releases/tag/v0.12.0). Here is the list of changes for each release: ## v0.12.0 ``` What's Changed feat(ruby): add gem uninstall functionality by @vitallium in zed-extensions/ruby#135 Add support for debug locators by @Hawkbawk in zed-extensions/ruby#130 feat(ruby): Add basic support for displaying dbg variables by @vitallium in zed-extensions/ruby#125 Add snippets by @andyw8 in zed-extensions/ruby#53 fix(rdbg): Improve debugger argument handling by @vitallium in zed-extensions/ruby#136 ``` ## v0.11.0 ``` What's Changed feat(rdbg): support RUBY_DEBUG env vars for host and port by @vitallium in zed-extensions/ruby#123 feat(rdbg): support attach requests for rdbg debugger by @vitallium in zed-extensions/ruby#124 Update Rust crate serde to v1.0.219 by @renovate in zed-extensions/ruby#116 Update Rust crate serde_json to v1.0.140 by @renovate in zed-extensions/ruby#117 Ensure cwd actually has a default by @Hawkbawk in zed-extensions/ruby#127 Ensure command args aren't parsed by rdbg by @Hawkbawk in zed-extensions/ruby#128 Support Rake outlines by @joeldrapper in zed-extensions/ruby#131 ``` Thanks!
Hi, this pull request updates the Ruby extension from v0.10.1 to [v0.12.0](https://github.com/zed-extensions/ruby/releases/tag/v0.12.0). Here is the list of changes for each release: ## v0.12.0 ``` What's Changed feat(ruby): add gem uninstall functionality by @vitallium in zed-extensions/ruby#135 Add support for debug locators by @Hawkbawk in zed-extensions/ruby#130 feat(ruby): Add basic support for displaying dbg variables by @vitallium in zed-extensions/ruby#125 Add snippets by @andyw8 in zed-extensions/ruby#53 fix(rdbg): Improve debugger argument handling by @vitallium in zed-extensions/ruby#136 ``` ## v0.11.0 ``` What's Changed feat(rdbg): support RUBY_DEBUG env vars for host and port by @vitallium in zed-extensions/ruby#123 feat(rdbg): support attach requests for rdbg debugger by @vitallium in zed-extensions/ruby#124 Update Rust crate serde to v1.0.219 by @renovate in zed-extensions/ruby#116 Update Rust crate serde_json to v1.0.140 by @renovate in zed-extensions/ruby#117 Ensure cwd actually has a default by @Hawkbawk in zed-extensions/ruby#127 Ensure command args aren't parsed by rdbg by @Hawkbawk in zed-extensions/ruby#128 Support Rake outlines by @joeldrapper in zed-extensions/ruby#131 ``` Thanks!
Ensure that all commands and arguments come after an options terminator, as heavily recommended by rdbg themselves. This ensures that rdbg doesn't attempt to parse and delete options that are meant for the program.