Desarrollo y Mantenimiento de Sistemas Informáticos

4º. 1er cuatrimestre. Itinerario de Sistemas de la Información. Grado en Ingeniería Informática. ULL


Organization DMSI org   Github Classroom DMSI class   Campus Virtual DMSI campus   Profesor Casiano   Chat Chat

Debugging with Chrome

Debugging Client Code with Chrome

Debugging NodeJS with Chrome

En la terminal:

➜   node --version
v14.4.0
➜   node --inspect-brk logging-espree.js
Debugger listening on ws://127.0.0.1:9229/331b3011-c7f5-447f-8731-1371c53847a5
For help, see: https://nodejs.org/en/docs/inspector

the option --inspect-brk=[host:port] does the following:

En el navegador abrimos la URL chrome://inspect y hacemos click en el enlace inspect

Insert debugger statements wherever you want to set a break-point:

Debugging with Visual Studio

If the Auto Attach feature is enabled, the Node debugger automatically attaches to certain Node.js processes that have been launched from VS Code’s Integrated Terminal. To enable the feature, either use the Toggle Auto Attach command from the command palette (F1) or, if it’s already activated, use the Auto Attach Status bar item

After enabling Auto Attach, you’ll need to restart your terminal.

See Node.js debugging in VS Code

References