Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Kimmax111067yRun your code in a browser and use the developer tools to debug the code. Yiu can set breakpoints etc
-
@Kimmax But the bug was in the server's nodejs files. It runs locally on my machine.
-
@heyheni OK... I wish I knew that when I was working on it 😠😂 Thanks anyway. Now I know that for the next time.
-
hawkes15727yVS Code also has a very nice debugger for node, with source maps support and everything.
-
crisz82367yAlso C doesn't say anything! You can download JSLint plugin from visual studio code, configure it and you won't have similar problems
Related Rants
So recently I needed to make a little Tic-tac-toe game with Node.JS for an university project. I previously learned Java and C# so Javascript as a non-compiled, script based language was something new for me.
Now during the programming process I reached the point where I needed to implement a function to change the player who's playing.
I was testing the game and... It seemed like the player was changed twice so it immediately switched back to the previous player.
Using a lot of console.log's I finally stumbled upon the error... (since Javascript or at least Visual Studio Code, I honestly don't know, doesn't have any kind of debugger or something).
Why the fuck does js allow to make allocations in if conditions?
I accidentally wrote one '=' instead of three '==='.
No error, no warning... Nothing.
Since then js and me are not friends anymore.
undefined
nodejs
tictactoe
javascript
js