I'm setting up an Express Server and it's working properly or seems to be. What I send gets rendered in the browser and my console.log test statements show up in my terminal but when I inspect the browser page it is not showing up in the browser console. I've never had this happen before. Any input??
You cannot show express console logs on browsers console.
Related
I've been attempting to verify some information but I haven't been able to receive any data on the console. I suspect that my code may not be functioning properly, so I accessed just github.com/reddit.com, and here the console produced an error. Initially, I believed that this issue may be related to a problematic browser extension, so I disabled all extensions and opened an incognito window. However, in this case, the console is entirely empty. Does anyone have any suggestions as to what could be the issue?Below are the screenshots:
Tried running a js web app and found the console showing error. Then diabled the extensions and found the console completely blank.
While running VS Code Live Server (Go Live), the browser is crashing with the below mentioned error. I am using Google Chrome as default. I re-installed VS Code after uninstalling completely (from cache even), restarted browser, and then restarted PC as well with no use. When I checked "Use Local Ip" in LiveServer>Settings:, server is taking too long to respond and eventually fails to load the page (Error: "This site can't be reached"). Another important thing is that Chrome is opening every other website properly. This problem exists only when opening VS Code Live Server. Below is the error code:
Chrome Browser Error:
"Aw, Snap!
Something went wrong while displaying this webpage.
Error code: STATUS_BREAKPOINT"
Another popup is also showing up simultaneously:
"DevTools was disconnected from the page.
Once page is reloaded, DevTools will automatically reconnect."
(This didn't seem like a bug in the code of script.js)
Found the Solution:
Indeed it is a bug in the code of script.js.
If you are having exactly the same problem as I described, let us first see what we don't need to do, as I found these suggestions everywhere, and none will work when both VS Code and your browser are perfectly fine (they only appear to be not working):
No need to restart or reinstall VS Code.
No need to restart or reinstall browser.
No need to restart the PC
No need to disable browser extensions or VS Code extensions.
No need to change LiveServer Custom Browser; you can keep it
default.
No need to change LiveServer>Settings>Use local ip or Use browser
preview (you can keep them both unchecked if they are already
unchecked by default)
However, if you use firefox, console shows the error: "Uncaught out of memory"
Here, I got the first hint. Firefox at least told me to look at memory, but it is not about the memory we think. It is not about multiple tabs opened, lack of disk space, unstable disk, etc. It is the accidentally generated infinite loop in the code which is causing the memory problem (check your code carefully to find it).
In my case, I accidentally didn't tell it to execute the next iteration (i.e., missing counter update, increment, i++) and it is stuck in the same while loop forever, as the condition is satisfied forever without any counter update.
After fixing the code, the below error might show up in the console. Just refresh the page and it will go away.
"favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)"
Note: Unless you fix the code or comment it out, other linked files (like .html) in the folder wouldn't work either.
I have a website that is hosted by Firebase on which I badly commented some lines of code. That code has been fixed and deployed but the problem persists.
I changed an aspect of the HTML to see if the website gets deployed at all whenever I tell it to and that changed in a few seconds. The error is still there though and if I go in the console and click on the line the error should be on it still shows me my old script which is now fixed.
code my error points to(this is what it actually looked like about 5 deploys ago): https://imgur.com/a/TmA29tP
actual code (removed the comments) (/public/assets/js/login.js): https://imgur.com/a/3pyjTwd
I expected the error to go away after deploying as the site is actually updating its files as I saw after testing it with the HTML element but all I get is the login.js:56 Uncaught SyntaxError: Unexpected end of input error because the comment is badly placed.
EDIT: This solution worked for me: Disabling Chrome cache for website development
it is likely because you need to hard refresh (e.g. bust cache) to see your new site.
In chrome, there is an option to disable caching while you have dev tools open. You should enable that option, refresh the site with dev tools open, and see if your problem persists.
I tried to use DEBUG = * for debugging purposes in javascript socket.io. After debugging, I erased my codes related to that because I don't need it anymore at the moment. But when I try to run my application again, the debugger is still printed in my browser console.
I need help, please. I just want it gone so that I can view my other consoles. What happens when I console something, my browser console gets flooded with socket.io-client:socket and i can't read my console anymore.
Where console.log('') gets printed, if I don't have a local setup and working on code inside the browser.
you can see the output in the Developer console. In Firefox and Chrome browsers for example - hit CTRL-SHIFT-I and it pops up - then go to ...Console..JS and you can see what you console.log() there
Beyond that (eg. client and runtime logs) see How do I see the logs for Fabric Composer
Writing console.log in a Transaction can be used to debug and see the incoming and outgoing data. It can be viewed using developer options by pressing Ctrl+Shift+i in Chrome or Firefox.
But if you are using Composer Playground locally, then the log output is written to the Docker Container.