mirror of https://github.com/nodejs/node.git
[debugger] more informative break message (reverting back partially)
parent
8d7aade663
commit
03adceec62
|
@ -616,14 +616,20 @@ function SourceUnderline(sourceText, position) {
|
|||
}
|
||||
|
||||
|
||||
function SourceInvocation(body) {
|
||||
return body.invocationText.replace(/\n/g, '')
|
||||
.replace(/^([^(]*)\(.*\)([^)]*)$/, '$1(...)$2');
|
||||
}
|
||||
|
||||
|
||||
function SourceInfo(body) {
|
||||
var result = '';
|
||||
var result = 'break in ' + SourceInvocation(body);
|
||||
|
||||
if (body.script) {
|
||||
if (body.script.name) {
|
||||
result += body.script.name;
|
||||
result += ', ' + body.script.name;
|
||||
} else {
|
||||
result += '[unnamed]';
|
||||
result += ', [unnamed]';
|
||||
}
|
||||
}
|
||||
result += ':';
|
||||
|
|
Loading…
Reference in New Issue