Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Workspace source auto complete not working

I've created a silly html page and added Rxjs and Rx-Dom JavaScript files. I've added an app.js file to write my code. I'm running a simple web server to serve the files. I've added my local folder as a Workspace folder in Chrome. Now whenever I write some code in the Chrome console I'm getting the autocomplete, but whenever I'm switching to source and try to write something in the source file, I'm not getting any autocomplete. As to what I'm saying related to the picture, writing anything in the app.js file I'm not not getting autocomplete. Is there something I'm missing.

OS - Windows 10 (Build 10586.71)

Chrome - Version 48.0.2564.82

Chrome

like image 328
Soham Dasgupta Avatar asked Feb 09 '16 18:02

Soham Dasgupta


People also ask

What is DPR in Chrome?

The number of device pixels that make up a CSS pixel in one direction is its Device Pixel Ratio (DPR). You can interpret this as the width (or height) of the grid of device pixels that fit inside one CSS pixel.

How to save changes in developer tools Chrome?

To save your changes, press CTRL + S when editing the file.

How do I open my workspace in Chrome?

Press Command+Option+J (Mac) or Control+Shift+J (Windows, Linux, ChromeOS) to open the Console panel of DevTools. Click the Sources tab. Click the Filesystem tab. Click Add Folder To Workspace.


1 Answers

Although both Console and Sources panels have autocomplete functionality, they work quite differently.

The autocomlpete in Sources panel is pretty dumb. It will show you only words you've already typed in the edited file. Actually, the autocomplete system in Sources Panel doesn't even know that you're editing JavaScript.

The autocomplete in Console is way more clever - it suggests autocompletion values based on the runtime inspection.

This way, you see "document" and "window" in the console autocomplete, and you usually don't have them in the "Sources" autocomplete.

like image 57
Andrey Lushnikov Avatar answered Oct 27 '22 00:10

Andrey Lushnikov