For example you have the following code;

function reverse(str) {
let reversed = "";
for (let char of str) {
reversed = char + reversed;
}
return reversed;
} module.exports = reverse;

If you want to debug is in Node, you can do:

function reverse(str) {
let reversed = "";
for (let char of str) {
debugger; // add debugger
reversed = char + reversed;
}
return reversed;
} reverse("awefw"); // call the function module.exports = reverse;

Then in cmd, run:

node inspect index.js

Then just type 'continue' or just 'c'.

It will pause on liine of 'debugger;' Now for example you want to see, what is the variable 'str':

you can type: 'repl':

Then after you enter 'str', you will see the output.

[Debug] Debugger Statements的更多相关文章

  1. React Native & debug & debugger

    React Native & debug & debugger http://localhost:8081/debugger-ui/ react-devtools # yarn: $ ...

  2. c# 判断当前版本是Debugger或Release

    1.第一种 (常用) #if DEBUG //debugger 环境 #else //release 环境 #endif 2. 第二种 private bool IsDebug() { Assembl ...

  3. ARMV8 datasheet学习笔记4:AArch64系统级体系结构之Self-hosted debug

    1. 前言 2. 关于self-hosted debug Debugger调试器 是操作系统或系统软件的一部分,它会处理debug exception或修改debug system register, ...

  4. JSLint检测Javascript语法规范

    前端javascript代码编写中,有一个不错的工具叫JSLint,可以检查代码规范化,压缩JS,CSS等,但是他的语法规范检查个人觉得太“苛刻”了,会提示各种各样的问题修改建议,有时候提示的信息我们 ...

  5. Drools mvel方言drl断点调试方法

    开发环境:myeclipse2014,  jdk1.8.0.91,drools6.4.0.Final, drools-eclipse-plugin,mvel2-2.2.6.Final问题描述:drl使 ...

  6. 代码检查工具jshint和csslint

    前面的话 Douglas Crockford大神根据自己的理念用JavaScript写了一个JavaScript代码规范检查工具,这就是JSLint.后来非常流行,也的确帮助了广大的JavaScrip ...

  7. sublime使用总结

    上周忙呀忙~    周一到五在忙项目,周六日搬家    在帝都平均一年就要换一次房子,从开始找房子到成功住进去前前后后大约花了半个多月的时间    什么时候就有自己的小窝了-- 之前开发一直用的都是W ...

  8. dfsdf

    This project was bootstrapped with Create React App. Below you will find some information on how to ...

  9. nodejs 前端工具总结

    htmlhint https://github.com/yaniswang/HTMLHint 使用 var HTMLHint = require("htmlhint").HTMLH ...

随机推荐

  1. SQL SERVER CONVERT函数

    定义: CONVERT函数返回 转换了数据类型的数据. 语法: CONVERT(target_type,expression,date_style smallint) 参数: ①target_type ...

  2. oracle 创建新用户,授权dba

    1.用有dba权限的用户登录:sys用户 2.创建一个新用户:create user abc identified by 123456; 3.授予DBA权限: grant connect,resour ...

  3. 【AtCoder】ARC064

    ARC064 C - Boxes and Candies 先把每个盒子都消到x 然后从前往后推,要求第二个的上界是x-前一个 因为我们要求靠后的那个尽量小,会对后面的修改影响尽量小 #include ...

  4. [DEBUG] Spring boot前端html无法下载示例文件

    更新:原方法打jar包的时候是可以的,后来我打war包之后下载的文件就是0字节.尴尬:) 所以现在更换一种方法,然后打war包.在服务器已测试成功. 前端不需要改变,只需要更改controller: ...

  5. Windows Eclipse Scala的入门HelloWorld

    [学习笔记] Windows Eclipse Scala的入门HelloWorld 有关带scala版本的eclipse4.7的下载, 你可以直接去: http://scala-ide.org/dow ...

  6. 莫比乌斯反演--HDU模板题

    题意:http://acm.hdu.edu.cn/showproblem.php?pid=1695 直接上莫比乌斯模板. #include <bits/stdc++.h> using na ...

  7. PHP接收前端传值各种情况整理

    PHP接收前端传值各种情况整理 服务端代码: header('Access-Control-Allow-Origin:*'); var_dump($_POST); exit; 情况 1) 传null ...

  8. Vue路由传参及传参后刷新导致参数消失处理

    项目功能需要,要从列表页跳转到第三方提供的URL上(这里第三方页面我是通过iframe引入在详情页,目的是点击返回时可以通过keepAlive让列表页不刷新,如果不通过iframe直接跳第三方链接,那 ...

  9. MySQL create table语法详解

    前面在查建表时key和index的区别时,发现建表语句包含了太多信息,于是完整看看官方手册的这一小节. 该文章根据MySQL 5.7的手册作笔记,而MySQL 8.0该节地址如下: https://d ...

  10. Servlet获取JSP中的汉字乱码问题解决方案

    1.String customerName=request.getParameter("customer_name");这样会出现乱码 解决方案很简单: String custom ...