Can dev tools extension affect the Sources tab?

119 views
Skip to first unread message

Curtis Robinson

unread,
Jul 21, 2023, 6:47:05 PM7/21/23
to Chrome DevTools
I code a lot of JS directly in the Sources tab. I use it as my IDE when I code games in vanilla JS.

I want to make these changes, are any of them possible? I'm willing to code my own chrome extension for myself.

1. I want to turn off code autocompletion when typing inside a javascript file in the Sources tab. If I uncheck autocompletion in Preferences->Sources, it removes autocompletion from the console, which I need.

2. When my cursor is inside a file in the sources tab and I press control+D I want it to duplicate the current line of code, instead of bookmarking the webpage.

3. I want to be able to press control+click to go to the definition of a global function. Currently if I type myGlobalFunctionName in the console, then click the code that it displays in the console, it does take me to the definition, so it is possible.

4. I want to increase the font size of my code that's in the Sources tab, without increasing the size of all the panels and bars in all of dev tools.

5. When I click Search next, if the next occurrence can be visible when not horizontally scrolled, then reset my horizontal scroll. The problem is I search for a word, and it's on a long line of code, so it scrolls me to the right, which is fine, but then the next occurrence is on a short line of code and it doesn't even scroll back enough left to see the full word that I searched for.

6. I'd like the cursor to blink much faster and be thicker.

guest271314

unread,
Jul 21, 2023, 8:34:52 PM7/21/23
to google-chrome-...@googlegroups.com
You can build a devtools_page panel extension that achieves those exact requirements.

--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/7f3b019d-60af-42da-8b3b-f8045a77b53en%40googlegroups.com.

Benedikt Meurer

unread,
Jul 24, 2023, 5:02:26 AM7/24/23
to google-chrome-...@googlegroups.com, Michael Hablich
Hey Curtis,

You cannot affect these behaviors via extensions. But your suggestions are very interesting (@Michael Hablich FYI).

Specifically regarding 1. what's the reason that you don't want autocompletion in the Soruces panel, but you want it inside the Console?

cheers,
Benedikt



--

Benedikt Meurer

Chrome DevTools Lead

bme...@google.com


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. 

     

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

guest271314

unread,
Jul 24, 2023, 10:10:07 AM7/24/23
to google-chrome-...@googlegroups.com
> You cannot affect these behaviors via extensions.

Sure you can. With a devtools_page panel extension you have complete control over the embedded HTML and JavaScript of panel. It won't be Sources tab, it will be whatever you name the panel. Then you can toggle on and off autocomplete, or do whatever you want. E.g., https://github.com/guest271314/devtools_panel_code_formatter.

Curtis Robinson

unread,
Dec 19, 2023, 11:14:54 PM12/19/23
to Chrome DevTools
Thanks for the replies. The main reason I want to disable autocomplete is because after typing I generally want to press the up/down arrow keys to move to another line, but they are taken by the autocomplete. Thankfully it doesn't hijack home/end keys like other IDEs do. Also it blocks the view of several lines of code below my cursor. As a solo dev who works on my project all day, I've memorized all my variable names and they are easy to type.

I looked into devtools_page but haven't figured out how to disable autocomplete. If someone could send the code I'd be grateful.

As for the blinking cursor, maybe I should submit that as a bug, since it isn't using my Windows cursor settings in the sources tab, but as I type this comment the textarea on this site does use my Windows cursor settings.

Benedikt Meurer

unread,
Dec 20, 2023, 1:24:23 AM12/20/23
to google-chrome-...@googlegroups.com
Regarding the blinking cursor setting, that might be a bug / missing feature in CodeMirror and it might be possible to address that.



--

Benedikt Meurer

Chrome DevTools Manager

Reply all
Reply to author
Forward
0 new messages