Has the Chrome console's autocomplete feature gotten more aggressive? - google-chrome

It seems like lately I have been having been getting hung up on the auto-completion drop down when using the console in Chrome DevTools. It seems like it has suddenly gotten more aggressive. I have never had a problem with the feature until the other day when I was trying to enter commands into the console quickly in order to test things. I wasn't sure why it wasn't working right. when I'd hit Enter auto-completion kept popping up and not executing what I typed. At first it seems as if auto-completion was activating whenever I would hit Enter to execute my code. However, it began to look like it was only popping up when I would end a statement with ;.
For example, typing the following statement into the console and pressing Enter would not cause the autocomplete drop down to activate:
console.log('did it')
However, if I add a semicolon then as soon as I press ; a number of milliseconds later the autocompletion feature immediately pops up:
console.log('did it');
At this point if I press Enter it will simply select the first entry, $, and add it as the next statement so we get:
console.log('did it');$
I know this is not really a big deal, after all, the only reason you would need the semicolon is for entering in multiple statements. However, I feel like in the past I've always added a semicolon ; to the end of simple single test statements such as the console.log shown above not activated the auto-completion, being able to execute it by just hitting Enter.
I definitely feel like my console's auto-completion is being activated more aggressive than it used to.
Has anyone else felt like the auto-completion in the console is activating too often all of the sudden? I am wondering whether or not this could have actually been changed in Chrome or if somehow I have made my console start acting this way with a setting or something?
While writing this I noticed that it seems not to only be after ; that auto-completion seems to pop up when it hadn't before. If you refer to Chrome DevTools - Using the Console you'll see that auto-completion is only referred to once:
The Console attempts to evaluate any JavaScript expression you enter at the shell prompt, upon pressing the Return or Enter key. The Console provides auto-completion and tab-completion. As you type expressions, property names are automatically suggested. If there are multiple properties with the same prefix, pressing the Tab key cycles through them. Pressing the right arrow key accepts the current suggestion. The current suggestion is also accepted by pressing the Tab key if there is only one matched property.
After this it goes on to say that we can use Shift+Enter in order to enter a multi-line expression and it gives the following example:
(source: google.com)
This is something I know for sure I have done plenty of times in the past with no problems from auto-completion. When I try to type the code in the above image I get as far as:
var add = function (val1, val2) {
Then when I press Shift+Enter instead of going to a new line like I am positive it did before (for me at least). Apparently anytime a new statement is started it will pop up. Has anyone else started getting highly annoyed at this feature as of very recently? Does anyone know if there's a way I could have caused this behavior?

Whoever answered my question before deleted their answer. I would like to close the question as it has been answered. This is indeed a bug as stated in the comments above and on the deleted answer. Anyone else that is here because they are experiencing problems as well will have to wait for the release to make it down to their version of Chrome, with Canary getting it first of course. You could presumably install an earlier version of Chrome to get around this as well. I know this is not directly about coding, but I see no reason to close it now when others may find the information useful.
Link to the Chrome Issue referencing this problem: https://code.google.com/p/chromium/issues/detail?id=263925

Related

Hide warning messages in console window

The Chrome console window is full of warning messages that I like to hide.
Is it possible to hide the warning logs?
I only want to show my custom logs e.g. console.log('mymessage');
This is how the console windowbar looks like:
Just recently there was a Chrome update. Now filtering single message types is possible (Verbose, Info, Warnings, Errors)! (My Version: Version 60.0.3112.90)
When opening the console, instead of selecting a "filter level", you can now check or uncheck each message type.
As of Chrome version 78 (Dec 2019), in the "Console" tab, click on the "Default levels" pulldown, and uncheck the types of messages you don't want displayed.
At the top bar of the console log you can select what kind of messages should be shown.
All is selected by default. Select error to see only error.
You can press ctrl + click to select multiple message types.
First off: you can hide all warnings and show only console.log output if you are using Microsoft Edge. In the console, there are a couple of icons representing the different levels of log output you may be using - error, warning, and info. If you just want to hide warnings, you can simply toggle the warning icon to off.
Also, if you are on firefox, you can set the log to only display info, in which case the warnings will also be hidden.
Next, to elaborate on the other answer, and phrase what I said (above in my comment) in the form of an answer:
For chrome, you cannot toggle specific levels off individually (newer versions of Chrome). Instead, you have to set an overall verbosity level for the log. By using the strictest level (i.e. the level that displays the least), you can minimize console messages that are created by portions of code that you did not write. In this case, that is the error level.
If you are just trying to hide warning messages for testing purposes, you can, for the time being, switch over to only logging messages at the error level. In production, this is not good practice, as it doesn't let you differentiate between helpful info log messages or actual errors.
To log a message as an error, use:
console.error('mymessage');
Then, as mentioned above, you can change the Level of your console output to error, which will only show you error messages. It will ignore console.log as well as any warning messages.
Be sure to change your calls to console.error back to console.log when you are done with the development phase of your work, for any instances where you are calling console.error with some message that does not describe an error.
Now, if you are getting warnings due to something you are doing in your code, you may want to consider spending time trying to correct whatever is causing those warnings to appear. Warnings are generally well thought out, and are there to help you prevent issues in your code that you may not be aware of. Correcting any issues in your code would also cause the warning messages to go away.
NOTE: you cannot tell the console to only display messages you print out, even at the level of verbosity you set your console to. This is because the console would have no way of knowing which statements you are logging out, versus which statements code your webpage is running that was written by someone else is logging out. The steps mentioned in this answer as well as the other are workarounds that may improve your situation.
UPDATE: It seems like Chrome has reintroduced the ability to enable/disable different levels of console logging individually. Now, when clicking on log level, you can toggle whether certain log levels are enabled or disabled.
Under the console tab it is now possible to highlight the message type as a general filter. There is also a filter box right next to the eyeball. So if you put a unique flag in your console.log then it will show only your messages with this flag.
But in general. I think you want to click the 'Info' item as highlighted below to just obtain the console.log messages
There is a drop down next to filter, where can you select only things you require.
Note : ReactJS warnings are actually displayed in red as errors. So to remove them you need to uncheck errors too.

PhpStorm disable hints after typing, enable method parameter hints

It's driving my crazy that every time I type a comma and than hit enter, some hinted method is inserted into my code because PhpStorm thought it should display a code hint. I only want hinting when I'm typing a variable or a method name, is this possible?
Also, I once saw some PhpStorm hinting that when the user typed a method name, PhpStorm displayed the required variables just above that method as a hint, but I can't find the setting for it.
I don't mean this, but I can't find an image of it:
Ah, I just found out it was probably some beta version of PhpStorm 2017.1, I downloaded the release today and instantly saw what I was looking for:

PHPstorm console input not working during debug sessions

I'm using a PHP script which expects user input from a command like fgets(STDIN). The problem is it no longer works in the newest version of PHPStorm (10).
The same works when I run it directly (without debugger enabled) and anything I enter in the console is sent to the script (on direct run).
But during a debug session, when I try to input text at the script's prompt, it does not go to the script. My best guess is that the new REPL feature is overriding user input in console during debugging. I say this because pressing the UP/DOWN arrows opens up a popup with all PHP function names.
It used to work correctly with last version.
How can I send user input to my PHP script with this new version? Am I missing something here?
I'm not sure if this is the same thing, but I was running into this same problem, and I was able to get it working by deselecting the "Use Console Input" checkbox in the PHPStorm Console.
John's answer is perfect.
I want to mention that the Use Console Input is a tiny icon in sidebar of the debug console. I provide you by this image

Why does my code produce a different result on occasion in apps-script?

I have a very strange problem. I load my app, switch to the correct tab and then press the button I need to press. This runs a function and when I first load the page it may only provide part of the correct result. However if I wait a few seconds it produces the correct result in full. Any ideas why this might be happening?
Additional Information
The button simply checks through a list of objects returned via ScriptDB. Objects that are valid are displayed and objects that are in-valid are not. If the object appears again in updates the text to display how many have been found in the list (eg: the label would change from "Object A" to "Object A (2)").
It seems to me like it doesn't have the rest of the list somehow as it doesn't always stop at the same object. It's Very strange and not something I've experienced before. The other features of my app using ScriptDB work completely regardless of how quickly I use them.
I've figured it out now. I somehow had some erroneous data in the database which was returning a null field. I can only assume that this was from a import that I did last week from a spreadsheet.
This was copied from my comment to show that it has been resolved.

Method or Data Member Not found for every control or event

Got a weird problem. I was debugging some code for a form and everything was working as intended for the most part when suddenly I began to get a "Method or Data Member Not Found" for every event of my form. It's like my form suddenly does not recognize any of my controls or events. I have all of my methods properly closed and did not rename any controls.
Any ideas on what would be the root of "Method or Data Member Not Found" for every single control with an event?
Thanks
Importing into a fresh database as talbright suggested gave me more descriptive error messages.
A fresh import, compact&repair, and renaming of appropriate control fixed the problem from occuring. As Remou suggested, regular maintenance can help prevent these sorts of problems.
edit for future readers: This problem occurred while using a shared front end file. So don't do that if possible.
I've found that any MISSING: reference can make the simplest of code fail.
Check in the visual basic window
Menu Tools -> References
look down the checked refences to see if any are MISSING
I just fixed the same error by renaming text and combo boxes something not so close to a concatenated Table & Field string. Actually just prepended those names with "tbx" and "cbx".