DEV Community

loading...

Discussion on: I can't find where is error . SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

blindfish3 profile image
Ben Calder

There's nothing wrong with console.log, but it soon becomes tedious adding and removing it from your code. That definitely takes longer than hitting
F12 + a couple of mouse clicks to get to the Network tab; which doesn't even require you to open your editor.

Thread Thread
devdrake0 profile image
Si

Right, but the person you replied to said about adding one console.log

Thread Thread
blindfish3 profile image
Ben Calder

I wasn't being critical of the previous response. I just pointed out that in this context there's another approach that doesn't require console.log; that is certainly quicker; and that also illustrates a really useful debugging tool.
You however are adding nothing to the conversation...

Thread Thread
devdrake0 profile image
Si

I didn't say you were, but you're wrong when you say it's quicker. Depending on skill level, it could take a lot longer.

Even with a high skill level, sometimes a quick console.log is best.

I think you need to calm yourself down.

Thread Thread
blindfish3 profile image
Ben Calder

ROFL. You're being utterly pedantic. That's like saying a hand drill is quicker for someone who doesn't know how to use an electric drill. In the context described - i.e. debugging network requests - the network tab will always be the quickest way to see the result of a failed response.

As I said: I added this as a potentially useful avenue of learning (which may indeed be slower for those unfamiliar with the browser debugger; but will save them a lot of key-strokes in the long run). I don't see what you are adding to this conversation: are you saying we shouldn't suggest better solutions when they are available?

And it's going to take more than a couple of passive/aggressive comments to bring me out of my calm zone :D

Thread Thread
ivkemilioner profile image
ivkeMilioner Author

Thank you very much for info and your time!!! You helped me a lot!