You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

vscode-example-launch-configuration.md 2.8 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ## Pre-requisites
  2. ### Ruby Extension
  3. Install and configure the
  4. [ruby extension](https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby)
  5. ### Use `debase` and `ruby-debug-ide` gems locally
  6. Make sure to use a `Gemfile.local` file with `debase` and `ruby-debug-ide` gems.
  7. ~~~ruby
  8. # Include the regular Gemfile
  9. eval File.read('Gemfile')
  10. group :development do
  11. gem 'debase', require: false
  12. gem 'ruby-debug-ide', require: false
  13. end
  14. ~~~
  15. Execute `bundle config set --local gemfile Gemfile.local` to use it per default,
  16. then `bundle install`.
  17. ## Sample launch.json
  18. The following `launch.json` - to be placed in the `.vscode` folder - allows to use
  19. VSCode debugging features like **breakpoints** and **watches**.
  20. ```json
  21. {
  22. "version": "0.2.0",
  23. "configurations": [
  24. {
  25. "name": "Cucumber",
  26. "type": "Ruby",
  27. "request": "launch",
  28. "useBundler": true,
  29. "cwd": "${workspaceRoot}",
  30. "program": "${workspaceRoot}/bin/cucumber",
  31. "internalConsoleOptions": "openOnSessionStart"
  32. },
  33. {
  34. "name": "Cucumber current feature file",
  35. "type": "Ruby",
  36. "request": "launch",
  37. "useBundler": true,
  38. "cwd": "${workspaceRoot}",
  39. "program": "${workspaceRoot}/bin/cucumber",
  40. "args": ["${file}"],
  41. "internalConsoleOptions": "openOnSessionStart"
  42. },
  43. {
  44. "name": "Cucumber scenario under cursor",
  45. "type": "Ruby",
  46. "request": "launch",
  47. "useBundler": true,
  48. "cwd": "${workspaceRoot}",
  49. "program": "${workspaceRoot}/bin/cucumber",
  50. "args": ["${file}:${lineNumber}"],
  51. "internalConsoleOptions": "openOnSessionStart"
  52. },
  53. {
  54. "name": "Rspec",
  55. "type": "Ruby",
  56. "request": "launch",
  57. "useBundler": true,
  58. "cwd": "${workspaceRoot}",
  59. "program": "${workspaceRoot}/bin/rspec",
  60. "internalConsoleOptions": "openOnSessionStart"
  61. },
  62. {
  63. "name": "Rspec current file",
  64. "type": "Ruby",
  65. "request": "launch",
  66. "useBundler": true,
  67. "cwd": "${workspaceRoot}",
  68. "program": "${workspaceRoot}/bin/rspec",
  69. "args": ["${file}"],
  70. "internalConsoleOptions": "openOnSessionStart"
  71. },
  72. {
  73. "name": "Rspec current line",
  74. "type": "Ruby",
  75. "request": "launch",
  76. "useBundler": true,
  77. "cwd": "${workspaceRoot}",
  78. "program": "${workspaceRoot}/bin/rspec",
  79. "args": ["${file}:${lineNumber}"],
  80. "internalConsoleOptions": "openOnSessionStart"
  81. }
  82. ]
  83. }
  84. ```

No Description

Contributors (1)