Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

[Console] Clicking frame from console does not highlight line #4100

Closed
nchevobbe opened this issue Sep 20, 2017 · 4 comments
Closed

[Console] Clicking frame from console does not highlight line #4100

nchevobbe opened this issue Sep 20, 2017 · 4 comments
Labels

Comments

@nchevobbe
Copy link
Member

Steps to reproduce:

  1. Go to https://mdn.github.io/webassembly-examples/js-api-examples/fail.html
  2. Open the console (Cmd/Ctrl + K)
  3. Click on the exception location

sep-20-2017 08-56-21

Expected results:
I see the line I wanted to navigate to highlighted

Actual results:
There is no highlight, and I'm a bit lost where I should look at

It may be due to something not being loaded yet ?


Also, if I go back to the console and click on the frame again, I do see the highlighter:

sep-20-2017 08-57-08

But if I looked away for a moment, I may missed it, and being as lost as in the STR case. Maybe we could show the highlighter until the user scrolls ?

@jasonLaster jasonLaster changed the title Clicking frame from console does not highlight line [Console] Clicking frame from console does not highlight line Sep 20, 2017
@jasonLaster
Copy link
Contributor

this is a dupe of #4318.

@digitarald
Copy link
Contributor

@darkwing keeping the highlight too subtle and short is still an issue and affects all source/location navigation. One idea would be a bolder highlight (yellow) and a longer (3x longer?) lingering subtle highlight.

@digitarald digitarald mentioned this issue Nov 12, 2018
25 tasks
@nchevobbe
Copy link
Member Author

Something like the following works a bit better:

diff --git a/devtools/client/debugger/new/dist/debugger.css b/devtools/client/debugger/new/dist/debugger.css
--- a/devtools/client/debugger/new/dist/debugger.css
+++ b/devtools/client/debugger/new/dist/debugger.css
@@ -2997,26 +2997,25 @@ debug-expression-error {
 }
 
 .highlight-line .CodeMirror-line {
-  animation: fade-highlight-out 1.5s normal forwards;
+  background-color: var(--theme-highlight-gray);
+  animation-name: fade-highlight-out;
+  animation-duration: 0.5s;
+  animation-delay: 1s;
+  animation-fill-mode: forwards;
 }
 
 @keyframes fade-highlight-out {
-  0% {
-    background-color: var(--theme-highlight-gray);
-  }
   100% {
     background-color: transparent;
   }
 }
 
 .theme-dark .highlight-line .CodeMirror-line {
-  animation: fade-highlight-out-dark 1.5s normal forwards;
+  background-color: var(--theme-comment);
+  animation-name: fade-highlight-out-dark;
 }
 
 @keyframes fade-highlight-out-dark {
-  0% {
-    background-color: var(--theme-comment);
-  }
   100% {
     background-color: transparent;
   }

But there are still cases where the highlighter does not show up when clicking from the console (I guess a race condition somewhere, as the code I looked into should handle that).

Also, when did we switched to gray background ? It feels a bit odd to me, when tools we're used to (searchfox, github, …) show a yellow background.

One last thing: when you clicked on a location from the console, and the animation is over, clicking on the location again won't play the animation again. It should though, because you might have missed it the first time, or you just need a visual help to guide your eyes to that given line.

@darkwing
Copy link
Contributor

I hit this error, clicked it, and the proper location was highlighted.

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

No branches or pull requests

4 participants