Giter Site home page Giter Site logo

程序员八荣八耻 about notebook HOT 2 OPEN

msforest avatar msforest commented on September 20, 2024
程序员八荣八耻

from notebook.

Comments (2)

msforest avatar msforest commented on September 20, 2024

ie兼容

<!-- [ if IE] >
<link type="style/css" href="base.css" rel="stylesheet"/>
<![endif]-->

获取访问者IP

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>  
<script type="text/javascript">  
    document.write(returnCitySN["cip"]+','+returnCitySN["cname"]) ;
};
</script>

from notebook.

msforest avatar msforest commented on September 20, 2024

各种调试汇总

  1. chrome 调试
  • f8:执行到下一个断点处
  • f10:执行下一步代码
  • f11:进入到调用函数内部

chrome-devtool

  1. nodejs 调试
  • node-inspector使用
    • node-inspector是基于nodejs上安装的,安装命令是npm install -g node-inspector,参数-g 将node-inspector安装到系统环境变量中,可以在任何路径下执行,尽量保留。
    • node-inspector,在命令窗口执行该命令,启动inspector,不要关闭该窗口;也可以再后面加&符号,进入后台进程
    • ① 打开chrome,输入地址 http://127.0.0.1:8080/debug?port=5858
    • ②打开nodejs的调试模式:node --debug server.js | supervisor --debug server.js
    • ③ 开启页面服务器,html页面正常访问,e.g. http://127.0.0.1:8088,接口用的是node开启的3000端口,不是5858端口
    • 在①的窗口和往常一样添加断点,③刷新重新访问,①会检测到并停留在断点处等待放行
之前遇到的问题:①打开并添加了断点,②调试命令也执行了,就是不知道怎么访问页面让其停留在断点处,因为不知道③访问的端口是8080呢,还是5858呢?因为当时没有开启页面服务器,以为不需要;还用接口直接在地址栏访问5858,怎么也想不到竟然和3000有联系。[/晕死]

top

from notebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.