[debugger] more informative break message (reverting back partially)

pull/22966/head
Fedor Indutny 2011-09-10 12:38:42 +07:00
parent 8d7aade663
commit 03adceec62
1 changed files with 9 additions and 3 deletions

View File

@ -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 += ':';