Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line number stripped from "Backtrace message" (Firefox 43) #69

Open
skunkbad opened this issue Jan 28, 2017 · 3 comments
Open

Line number stripped from "Backtrace message" (Firefox 43) #69

skunkbad opened this issue Jan 28, 2017 · 3 comments

Comments

@skunkbad
Copy link

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,
			''
		]
	]
] ) ) ) );
@ccampbell
Copy link
Owner

Hi @skunkbad does this work in Chrome?

@skunkbad
Copy link
Author

skunkbad commented Apr 3, 2017

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.

@ccampbell
Copy link
Owner

What exactly do you mean? When I test in Chrome with line numbers turned on I see this:

5ymi

That looks correct to me I think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants