Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Why cannot I see console.log() messages in the web browser JavaScript console?

$
0
0

I have a dialog box implemented as HTML with a short script to call a server-side Apps Script function:

function ladeRezept() {  const link = document.getElementById("link").value;  console.log("Aufruf extrahiereVonChefkoch mit:", link);  google.script.run.withSuccessHandler(function (data) {    console.log("Daten vom Server empfangen:", data);    document.getElementById("formular").style.display = "block";    document.getElementById("rezeptname").value = data.name;    document.getElementById("aufwand").value = data.aufwand;    document.getElementById("zutaten").value = data.zutaten.join(", ");    document.getElementById("staples").value = data.staples.join(", ");    document.getElementById("zubereitung").value = data.zubereitung;  }).extrahiereVonChefkoch(link);}

This seems to work because the web browser JavaScript console shows the expected messages from ladeRezept().

The problem is that the dialog box calls the server-side extrahiereVonChefkoch() function that also uses console.log(), but the web browser JavaScript console doesn't show those messages:

function extrahiereVonChefkoch(url) {  console.log("Funktion extrahiereVonChefkoch wurde aufgerufen mit URL:", url);  const html = UrlFetchApp.fetch(url).getContentText();  console.log("Length of fetched html: ", html.length);  // ...}

Why aren't the latter two messages shown in the web browser JavaScript console?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>