Skip to content

Commit

Permalink
Merge pull request #820 from puremourning/ruby-rdbg
Browse files Browse the repository at this point in the history
Update ruby example to rdbg
  • Loading branch information
mergify[bot] authored Jan 2, 2024
2 parents 4b07a56 + 30af90d commit 703df4d
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 14 deletions.
1 change: 1 addition & 0 deletions support/test/ruby/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Gemfile.lock
vendor/
bin/
1 change: 1 addition & 0 deletions support/test/ruby/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
62 changes: 54 additions & 8 deletions support/test/ruby/.vimspector.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,60 @@
{
"$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json",
"adapters": {
"rdbg-script": {
"variables": {
"port": "${unusedLocalPort}"
},
"launch": {
"remote": {
"runCommand": [
"${workspaceRoot}/bin/rdbg",
"--open",
"--port", "${port}",
"--",
"%CMD%"
]
}
},
"port": "${port}"
},
"rdbg-command": {
"variables": {
"port": "${unusedLocalPort}"
},
"launch": {
"remote": {
"runCommand": [
"${workspaceRoot}/bin/rdbg",
"--open",
"--port", "${port}",
"-c",
"--",
"%CMD%"
]
}
},
"port": "${port}"
}
},
"configurations": {
"launch current file": {
"adapter": "cust_vscode-ruby",
"run current script": {
"adapter": "rdbg-script",
"remote-cmdLine": [
"${file}"
],
"configuration": {
"request": "launch"
}
},
"run rails": {
"adapter": "rdbg-command",
"remote-cmdLine": [
"rails",
"server"
],
"configuration": {
"request": "launch",
"program": "${file}",
"args": [ "*${args}" ],
"useBundler": true,
"trace": true,
"showDebuggerOutput": true
"request": "launch"
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions support/test/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# gem "rails"

gem "ruby-debug-ide", "~> 0.7.2"

gem "debase", "~> 0.2.4"
gem "debug", "~> 1.9"
4 changes: 4 additions & 0 deletions support/test/ruby/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# First, make sure that ruby 3 is in your path

bundle install
bundle binstubs --force debug
13 changes: 12 additions & 1 deletion support/test/ruby/test.rb
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
print 'hello' 'world'
class Foo
def initialize
@bar = 'bar'
end

def bar
@bar
end
end

f = Foo.new
puts f.bar

0 comments on commit 703df4d

Please sign in to comment.