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 numbers not showing in Firefox 43 #57

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

Line numbers not showing in Firefox 43 #57

skunkbad opened this issue Jan 28, 2017 · 2 comments

Comments

@skunkbad
Copy link

skunkbad commented Jan 28, 2017

I see in the _log method that the backtrace message is a concatenation of the file path, a space, a colon, another space, and then the line number. The console drops the line number, resulting in something like this:

/path/to/file.php :

I noticed that if I add another colon and character to the backtrace message that the line then shows up, so a backtrace message that looks like this:

/path/to/file.php : 10 : 0

Will end up showing the console as:

/path/to/file.php : 10 :

So either the console is expecting something different, or the console is broken. If the console is expecting something different, it would be good to fix it. If the console is not expecting something different, then I need help with how to submit a bug to Firefox on this.

@Asenar
Copy link

Asenar commented Feb 20, 2017

Hi,

I think this is a bug from firefox console, but it can be fixed by changing the ChromePhp lib, adding 0 at the end of the backtrace instead of : 0 like you did.

I rebased some PR (from @okonomiyaki3000 and @ErikKrause repo). If you use it, you simply have to add this settings to make it works for firefox :

<?php
ChromePhp::getInstance()
    ->addSetting(ChromePhp::BACKTRACE_FORMAT, '{function_full:30} {file}:{line} 0');

@cyraid
Copy link

cyraid commented Jan 25, 2024

Line numbers are not working for me in Chrome. There is a bug when 'show line numbers' is active. log.js:81 shows 'unknown' in the console before every message.

if (_showLineNumbers() && backtrace !== null) {
  console.log('%c' + backtrace, 'color: ' + color1 + '; font-weight: bold;');
}

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

3 participants