Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
How can I capture stdout and stderr in the browser?

I'm trying to figure out how to capture stderr and stdout in the browser from the currently executing javascript.

This will be for a live code editor.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

JS has no stdout or stderr - it just has the console.

It is possible to override console.log() with your own function that does whatever processing you want, and ideally then pass the log message to the original console.log function. Ditto for console.error.

For example:

(function() {
    const log_orig = console.log;

    console.log = function() {
        log_orig.call(console, 'log called with ' arguments.length + ' parameters');
        log_orig.apply(console, arguments);
    }
})();  // IIFE
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can't.

Any output and errors that browser outputs are not exposed to JS.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda