chromelogger
chromelogger copied to clipboard
Line number stripped from "Backtrace message" (Firefox 43)
Backtrace message #1 is what you would expect to see in the Firefox 43 console, but the line number is stripped off:
<?php
// This displays "/path/to/example_url.php :"
$backtrace_message1 = '/path/to/example_url.php : 777';
// This displays "/path/to/example_url.php : 777 :"
$backtrace_message2 = '/path/to/example_url.php : 777 : 0';
// This displays "(unknown)"
$backtrace_message3 = '/path/to/example_url.php : 777 :';
// This displays "(unknown)"
$backtrace_message4 = '/path/to/example_url.php : 777 : 77 :';
// This displays "/path/to/example_url.php : 777 : 77 :"
$backtrace_message5 = '/path/to/example_url.php : 777 : 77 : 7';
// This displays "/path/to/example_url.php : 7777 : 777 : 77 :"
$backtrace_message6 = '/path/to/example_url.php : 7777 : 777 : 77 : 7';
header( 'X-ChromeLogger-Data: ' . base64_encode( utf8_encode( json_encode( [
'version' => '0.0.1',
'columns' => [
'log',
'backtrace',
'type'
],
'request_uri' => 'example_url.php',
'rows' => [
[
['epoch: ' . time()],
$backtrace_message1,
''
],
[
['epoch: ' . time()],
$backtrace_message2,
''
],
[
['epoch: ' . time()],
$backtrace_message3,
''
],
[
['epoch: ' . time()],
$backtrace_message4,
''
],
[
['epoch: ' . time()],
$backtrace_message5,
''
],
[
['epoch: ' . time()],
$backtrace_message6,
''
]
]
] ) ) ) );
Hi @skunkbad does this work in Chrome?
Actually, it looks like Firefox fixed the issue since I reported this. Chrome on the other hand does not work the same, because the line numbers all seem to come from log.js, which is totally useless.
What exactly do you mean? When I test in Chrome with line numbers turned on I see this:

That looks correct to me I think?