Uh oh!
There was an error while loading. Please reload this page.
debugger: introduce exec method for debugger - #1491
Conversation
442a8bf to
5d32f5dCompareThere was a problem hiding this comment.
Minor style issue: no space after function keyword.
bnoordhuis
commented
Apr 21, 2015
LGTM sans style nit. |
JacksonTian
commented
Apr 22, 2015
thanks @bnoordhuis |
39fa227 to
a358deeComparechrisdickinson
commented
Apr 22, 2015
Curious: down the line is there interest in moving to a more python pdb-style debugger, where the interface is a REPL by default and will evaluate any expression inline, but still respond to debugging commands? |
monsanto
commented
Apr 22, 2015
@chrisdickinson +1 this tripped me up when I first started playing with Node |
JacksonTian
commented
Apr 24, 2015
@chrisdickinson hope there is an |
JacksonTian
commented
May 4, 2015
ping anyone? |
silverwind
commented
May 10, 2015
Not sure this is the best approach. I've recently experimented with the debugger for the first time, and was a bit surprised it wasn't a real repl. How about actually making it a repl and adding all debug related commands to the existing list of commands shown in the repl with This would of course be an incompatible change, but having all commands prefixed with a dot would be my preferred method. Maybe add a short print to refer to |
rlidwka
commented
May 10, 2015
I use debugger heavily, and most commands I use are |
JacksonTian
commented
May 10, 2015
@silverwind the |
chrisdickinson
commented
May 10, 2015
I think we should take a page from python's book and allow those commands unprefixed, but if the line isn't a known command treat it as a repl utterance.
|
rlidwka
commented
May 11, 2015
That one where |
silverwind
commented
May 11, 2015
One way around this variable name problem could be to require a semicolon to access local variables, so |
jasnell
commented
Oct 22, 2015
@nodejs/collaborators ... anyone have any idea on the status of this? Is it still something that's wanted? /cc @JacksonTian |
JacksonTian
commented
Oct 22, 2015
yes, repl is ugly. |
silverwind
commented
Oct 22, 2015
@JacksonTian can you at least make it |
JacksonTian
commented
Oct 22, 2015
ok. |
JacksonTian
commented
Oct 22, 2015
@silverwind Implement |
There was a problem hiding this comment.
This should probably use an anchoring match (i.e. /^\s*exec) so it won't get confused by e.g. "exec exec exec" as the input.
EDIT: Can you add a regression test for that while you're at it? Thanks.
5cdde8e to
1031ab0CompareJacksonTian
commented
Nov 17, 2015
Thanks @bnoordhuis , I updated the commit. |
There was a problem hiding this comment.
Could you use an arrow function callback and get rid of self.
There was a problem hiding this comment.
The PR was submitted long time ago : ). updated.
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.1031ab0 to
dbeac9aComparecjihrig
commented
Nov 17, 2015
Thanks, LGTM. |
bnoordhuis
commented
Nov 17, 2015
LGTM2. I can't start the CI though, seems to be down at the moment. |
bnoordhuis
commented
Nov 17, 2015
And it's up again: https://ci.nodejs.org/job/node-test-pull-request/767/ |
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: #1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>jasnell
commented
Nov 17, 2015
Failures in CI look unrelated. Will get this landed. |
jasnell
commented
Nov 17, 2015
Landed in b33e9da |
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: #1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>MylesBorins
commented
Mar 10, 2016
Is this something we would want in LTS? /cc @nodejs/lts |
jasnell
commented
Mar 11, 2016
hmmm... good question. lts-agenda label applied. |
MylesBorins
commented
Mar 21, 2016
lts wg has agreed this poses little risk. Added |
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: #1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: #1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: #1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In debugger, the usage of
replvery ugly. I'd like there is aplike gdb. So the
execis coming.Usage:
And the
repl:The enter and leave debug repl is superfluous.