Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 3a0268e

Browse files
committed
show all stack frames as RubyMine does
1 parent 966a6cc commit 3a0268e

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Ruby",
33
"displayName": "Ruby",
4-
"version": "0.1.6",
4+
"version": "0.1.7",
55
"publisher": "rebornix",
66
"description": "Provides Ruby language and debugging support for Visual Studio Code",
77
"author": {
@@ -60,6 +60,14 @@
6060
"type": "boolean",
6161
"description": "Automatically stop after launch.",
6262
"default": true
63+
},
64+
"runtimeArgs": {
65+
"type": "array",
66+
"description": "Optional arguments passed to the runtime executable.",
67+
"items": {
68+
"type": "string"
69+
},
70+
"default": []
6371
}
6472
}
6573
}
@@ -70,8 +78,7 @@
7078
"name": "Ruby Debugger",
7179
"type": "Ruby",
7280
"request": "launch",
73-
"program": "main.rb",
74-
"stopOnEntry": true
81+
"program": "main.rb"
7582
}
7683
]
7784
}

readme.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,35 @@ In this extension, we implement [ruby debug ide protocol](http://debug-commons.r
3939
## Features
4040

4141
- Ruby scripts debugging
42-
* Line breakpoints
42+
* Line breakpoints (add, delete, disable, enable)
4343
* Step over, step in, step out, continue
4444
* Multiple, parallel threads
4545
* Call stack
4646
* Scope variables
47+
* Debug console
48+
* Watch window
49+
* Variables evaluate/inspect
4750

4851
## TODO
4952
- Ruby scripts debugging
5053
* Conditional breakpoints
5154
* Break on entry
5255
* Breaking on uncaught exceptions and errors
53-
* Debug console
54-
* Watch window
55-
* Variables evaluate/inspect
5656
* Attach requests
57+
- Ruby remote debug
58+
- Unit/Integration tests debugging
59+
* RSpec
60+
* Cucumber
61+
* Shoulda
62+
* Test::Unit
63+
- Rack
64+
- Rails
65+
- Rake
66+
- Gem
67+
- IRB console
5768
- IntelliSense and autocomplete
5869
- Linting
59-
- Unit/Integration tests debugging
60-
- Rails support
61-
- Remote hosting debug
70+
6271

6372
## License
6473

src/interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export interface LaunchRequestArguments {
88
stopOnEntry?: boolean;
99
/** Show debugger process output. If not specified, there will only be executable output */
1010
showDebuggerOutput?: boolean;
11+
/** Optional arguments passed to the runtime executable. */
12+
runtimeArgs?: string[];
1113
}
1214

1315
export interface IRubyEvaluationResult {

src/main.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,6 @@ class RubyDebugSession extends DebugSession {
198198
var line = frameNode.attributes.getNamedItem('line');
199199
var bn = basename(file.value);
200200

201-
//TODO: acutally we should check the workspace
202-
if (bn === 'ruby-debug-ide.rb' || bn === 'rdebug-ide') {
203-
break;
204-
}
205-
206201
var sourcesInFile = readFileSync(file.value).toString().split('\n');
207202
var code = sourcesInFile[this.convertDebuggerLineToClient(+line.value)-1].trim();
208203
frames.push(new StackFrame(

src/ruby.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export class RubyProcess extends EventEmitter {
3636
this.state = SocketClientState.ready;
3737

3838
var that = this;
39-
var runtimeArgs = [];
39+
var runtimeArgs = ['--evaluation-timeout', '10'];
4040
var runtimeExecutable = 'rdebug-ide';
4141
var programArgs = [];
4242
var processCwd = dirname(this.launchArgs.program);
4343

44-
this.debugprocess = childProcess.spawn(runtimeExecutable, [args.program, '-xd'], {cwd: processCwd});
44+
this.debugprocess = childProcess.spawn(runtimeExecutable, [...runtimeArgs, args.program, '-xd'], {cwd: processCwd});
4545
// redirect output to debug console
4646
this.debugprocess.stdout.on('data', (data: Buffer) => {
4747
that.emit('exeutableOutput', data);

0 commit comments

Comments
 (0)