Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Coding/Programming Interviews:Active Template Library (ATL)ActiveXApplication DeveloperArtificial intelligenceAssemblyAssociate Software EngineerAWKAWTC ProgrammingC++ ProgrammingCGI PerlCGI ProgrammingCMMICobolCritical ReasoningData Structures TreesDCOM COMDelphiDTDE4XExtensible Stylesheet Language (XSL)FortranFull-Stack DeveloperHaskellHTML DOMILUIPhone DeveloperJasper Reports DeveloperJava DeveloperLisp ProgrammingLotus NotesMicrosoft Foundation Class (MFC)Mobile DeveloperMVC DeveloperNode.jsOOPPascalPerl ProgrammingPHPPHP DeveloperProgrammingProgramming AlgorithmsProgramming ConceptsPythonRubyRuby on RailsRuby on Rails DeveloperSenior Front End DeveloperSenior Software DeveloperSignature ProgramSOASocket ProgrammingSoftware Development EngineerSoftware engineeringSr. PHP ProgrammerStack And QueueSTLSwift DeveloperTCL (Tool Command Language)Team Leader Android DeveloperUMLUnity 2D Games DeveloperUnity 3D DeveloperUnity DeveloperVBA (Visual Basic for Applications)Visual Basic (VB)Visual C++Web DevelopmentWin32APIWindows ProgramingWordPress DevelopmentWSDLXFormsXHTMLXLinkXMLXPathXQueryXSL-FOXSLT
Copyright © 2018. All Rights Reserved
Node.js Interview Question:
Do you know how to debug node.js applications?
Submitted by: AdministratorThere's a few tools and ways out there:
Interactive Stack Traces with traceGL - Shareware
Guide here
Profiling with Profiler
Install globally npm install -g profiler
Start your process with node --prof this will create a v8.log file
Build nprof by running ~/.nvm/v0.8.22/lib/node_modules/profiler/tools/build-nprof
Run ~/.nvm/v0.8.22/lib/node_modules/profiler/nprof this will read the v8.log profile and give you nice ouput
CPU and Memory Profiling with NodeTime
Install to your app npm install nodetime
Include in your app require('nodetime').profile()
Follow the instructions it will output to console
Alternatively, you may want to use look, which is based on nodetime but doesn't send data to nodetime.com.
Blink (formerly Webkit) Developer Tools Debugging with Node Inspector
Install it globally: npm install -g node-inspector
Run your app in debug mode: node --debug-brk your/node/program.js (or attach to a running process: kill -s USR1 <your node process id>)
In another terminal window run node-inspector: node-inspector
Open http://127.0.0.1:8080/debug?port=5858 (or debug remotely by replacing 127.0.0.1 with your host; make sure port 8080 is open)
Webkit Developer Tools Profiling with Node Webkit Agent
Install to your app npm install webkit-devtools-agent
Include in your app agent = require('webkit-devtools-agent')
Activate the agent: kill -SIGUSR2 <your node process id>
Access the agent via the appropriate link
Interactive Cloud9 Debugging
Guide here
Heapdumps to Webkit Developer Tools
Tool and guide here
Logging Libraries that output Debugging Information
Caterpillar
Tracer
Flamegraphs with Dtrace and StackVis
Only supported on SmartOS
Flamegraphs with Chrome Developer Tools
Coming soon
Benchmark
with Apache Bench: ab -n 100000 -c 1 http://127.0.0.1:9778/
with wrk
Submitted by: Administrator
Interactive Stack Traces with traceGL - Shareware
Guide here
Profiling with Profiler
Install globally npm install -g profiler
Start your process with node --prof this will create a v8.log file
Build nprof by running ~/.nvm/v0.8.22/lib/node_modules/profiler/tools/build-nprof
Run ~/.nvm/v0.8.22/lib/node_modules/profiler/nprof this will read the v8.log profile and give you nice ouput
CPU and Memory Profiling with NodeTime
Install to your app npm install nodetime
Include in your app require('nodetime').profile()
Follow the instructions it will output to console
Alternatively, you may want to use look, which is based on nodetime but doesn't send data to nodetime.com.
Blink (formerly Webkit) Developer Tools Debugging with Node Inspector
Install it globally: npm install -g node-inspector
Run your app in debug mode: node --debug-brk your/node/program.js (or attach to a running process: kill -s USR1 <your node process id>)
In another terminal window run node-inspector: node-inspector
Open http://127.0.0.1:8080/debug?port=5858 (or debug remotely by replacing 127.0.0.1 with your host; make sure port 8080 is open)
Webkit Developer Tools Profiling with Node Webkit Agent
Install to your app npm install webkit-devtools-agent
Include in your app agent = require('webkit-devtools-agent')
Activate the agent: kill -SIGUSR2 <your node process id>
Access the agent via the appropriate link
Interactive Cloud9 Debugging
Guide here
Heapdumps to Webkit Developer Tools
Tool and guide here
Logging Libraries that output Debugging Information
Caterpillar
Tracer
Flamegraphs with Dtrace and StackVis
Only supported on SmartOS
Flamegraphs with Chrome Developer Tools
Coming soon
Benchmark
with Apache Bench: ab -n 100000 -c 1 http://127.0.0.1:9778/
with wrk
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.