2

So basically I am making a flask application. I have few python print statement to mark checkpoints (debugging). Instead of print those statements in python console . I want it to be in browser console (i.e. console.log)

When I do: print("ok")

It should also print ok in browser log( like javascript console.log). Is there any library for achieving this or any other way of doing this

4
  • 2
    No, you can receive the message in javascript and then console.log() in it. Commented Jun 11, 2018 at 9:50
  • This question and answer may help you. Commented Jun 11, 2018 at 9:53
  • 1
    In some more words, your server (which is where your Python program runs) sends things which render a web page in the browser window. Some of that web page could be a Javascript program which writes to the browser console, but this is probably significantly more complex than you were hoping. Maybe there are JavaScript frameworks which make this reasonably easy actually; but the browesr console is fundamentally controlled by the browser, not by anything on your server. Commented Jun 11, 2018 at 10:12
  • Possible duplicate of JavaScript: How do I print a message to the error console? Commented Jun 11, 2018 at 10:14

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.