Giter VIP home page Giter VIP logo

bugger's Introduction

bugger

Build Status

Warning: Experimental

bugger provides Chrome Devtools bindings for node. It integrates tightly with Chrome which means two things:

  • It attempts to fully support the usual Devtools experience, including workspaces and profiling tools.
  • It may break at any moment because Chrome moves fast.

Installation

npm install -g bugger

Usage

Start the script process

Start example/alive.js in debug mode:

bugger example/alive.js

Pass parameters to the script:

# This will be interpreted as a port paramter for alive.js
bugger example/alive.js --port=3000
# This will be interpreted as a port paramter for bugger itself
bugger --port=3000 example/alive.js

Pass V8 options (or advanced node options):

node --trace_gc $(which bugger) example/alive.js

Open the devtools

The correct URL will be written to the output. It should look similar to this:

chrome-devtools://devtools/bundled/devtools.html?ws=127.0.0.1:8058/websocket

You can also open chrome://inspect if you started Chrome with --remote-debugging-targets=localhost:8058. The process should pop up on that page almost immediately.

Options:

  • -v, --version: Print version information
  • -h, --help: Show usage help
  • -p, --port: The devtools protocol port to use, default: 8058
  • -b, --brk: Pause on the first line of the script

Examples:

Using bugger with popular frameworks is easy and it is a lot faster then using node-inspector.

Jest:

Run node with bugger and jest:

node --harmony $(which bugger) ./node_modules/jest-cli/bin/jest.js --runInBand

A chrome devtools URL will appear in console, just copy and paste it into chrome.

Mocha:

Run bugger it with _mocha:

bugger --brk $(which _mocha)

A chrome devtools URL will appear in console, just copy and paste it into chrome.

Features

Console Tab

  • Basic support for console API
  • Evalute expressions in the console
  • Fully featured repl when not paused (including require)
  • Parts of the Command Line API supported

Sources Tab

  • Step-by-step debugging
  • Variable introspection
  • Live edit the running JavaScript code and persist it using workspaces (really just a Devtools feature)
  • Break on [uncaught] exception
  • Uses existing source maps (e.g. created via babel --source-maps or coffee --map)
  • Forked modules show up as worker threads. This includes modules forked via cluster.

Known Issues

  • For babel-core/register and coffee-script/register, editing the files doesn't work #48

Network Tab

  • Monitor outgoing http(s) requests your script does
  • Timing of requests, including connect times etc.

Timeline Tab

  • GC events
  • Basic heap usage graphs

Known Issues

  • The timeline tab doesn't do anything useful right now. In future it should show (#47):
    • console.{time, timeEnd, timeStamp}
    • Network request
    • Heap usage over time
    • Profiling data

Profiles Tab

Kudos to...

...the original projects

bugger was heavily inspired by node-inspector and nodebug.

Reference links

bugger's People

Contributors

jkrems avatar readmecritic avatar stenver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bugger's Issues

ECONNREFUSED on Ubuntu Server 14 - Accessing as root

Tried running bugger with the default command bugger myScript.js and I'm getting the ECONNREFUSED issue. Have tried using the webhost/port command line switches but to no avail.

I'm logged in as root so I wouldn't have thought there were any permissions issues?

Any thoughts?

Mirroring thrown objects and errors

Looking at the kind of results Chrome gives when an error is thrown

{ result: 
   { type: 'object',
     objectId: '{"injectedScriptId":1,"id":5}',
     subtype: 'error',
     className: 'ReferenceError',
     description: 'ReferenceError: foobar is not defined\n    at <anonymous>:1:1\n    at Object.InjectedScript._evaluateOn (<anonymous>:878:140)\n    at Object.InjectedScript._evaluateAndWrap (<anonymous>:811:34)\n    at Object.InjectedScript.evaluate (<anonymous>:667:21)' },
  wasThrown: true,
  exceptionDetails: 
   { text: 'Uncaught ReferenceError: foobar is not defined',
     url: '',
     line: 1,
     column: 0,
     stackTrace: [ [Object], [Object], [Object], [Object] ] } }

Versus the simplistic value bugger gives

{ result: { type: 'string', value: 'foobar is not defined' },
  wasThrown: true,
  exceptionDetails: { text: 'foobar is not defined' } }

Seems like mirroring the object and providing error.stack as a description would be preferable here?

not able to make it work

Hi Jan,

I'm kind of unable to make it work...
With node 0.10.22 I get an exception.
With node 0.11.8 I get:

C:\a\www\x>bugger x.js
Warning: Native modules not compiled.  XOR performance will be degraded.
Warning: Native modules not compiled.  UTF-8 validation disabled.

(this is from WS unable to compile the native module, which is optional)

... but when I open chrome-devtools://devtools/bundled/devtools.html?ws=127.0.0.1:8058/websocket in chrome, it seems to be connected ('cause I get a websocket_closed message if I kill the bugger process), but does not show any controls or anything... Just a blank page.

C:\a\www\x>bugger x.js

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ECONNREFUSED
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)
C:\a\www\x>type x.js
for(var i = 0; i< 10; i++) {
        console.log(i);
}
C:\a\www\x>node -p process.versions
{ http_parser: '1.0',
  node: '0.10.22',
  v8: '3.14.5.9',
  ares: '1.9.0-DEV',
  uv: '0.10.19',
  zlib: '1.2.3',
  modules: '11',
  openssl: '1.0.1e' }
C:\a\www\x>systeminfo
OS Name:                   Microsoft Windows 7 Enterprise
OS Version:                6.1.7601 Service Pack 1 Build 7601
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
Original Install Date:     18. 11. 2013, 11:11:28
System Boot Time:          21. 11. 2013, 21:05:54
System Manufacturer:       Hewlett-Packard
System Model:              HP ProBook 6460b
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 42 Stepping 7 GenuineIntel ~1575 Mhz
BIOS Version:              Hewlett-Packard 68SCE Ver. F.08, 26. 8. 2011
Windows Directory:         C:\windows
System Directory:          C:\windows\system32
Boot Device:               \Device\HarddiskVolume2
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
Total Physical Memory:     4 030 MB
Available Physical Memory: 1 473 MB
Virtual Memory: Max Size:  8 059 MB
Virtual Memory: Available: 5 100 MB
Virtual Memory: In Use:    2 959 MB
Page File Location(s):     C:\pagefile.sys
Network Card(s):           3 NIC(s) Installed.
                           [01]: Intel(R) 82579V Gigabit Network Connection
                                 Connection Name: Local Area Connection
                                 Status:          Media disconnected
                           [02]: Intel(R) Centrino(R) Advanced-N 6205
                                 Connection Name: Wireless Network Connection
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.2.1
                                 IP address(es)
                                 [01]: 192.168.2.123
                                 [02]: fe80::fcec:d563:b1fd:2adc
                           [03]: Bluetooth Device (Personal Area Network)
                                 Connection Name: Bluetooth Network Connection
                                 Status:          Media disconnected
chrome://version/
Chromium    33.0.1712.0 (Developer Build 235537) 
OS  Windows 
Blink   537.36 (@162160)
JavaScript  V8 3.23.5
Flash   11.7.700.203
User Agent  Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.0 Safari/537.36

the frontend url mentioned in README.md (chrome-devtools://devtools/devtools.html?ws=127.0.0.1:8058/websocket) seems to just keep loading forever

A more useful timeline tab

  • Timer events (e.g. setTimeout)
  • console.{time, timeEnd, timeStamp} support
  • Network requests
  • Profiling data that is actually visible
  • Heap usage reporting tied to events, not to a timer

Segmentation fault: 11

When trying to debug a coffeescript file, the bugger process exits with the message Segmentation fault: 11.

This can happen at any point in the debugged file, exactly as I "step into" a command. Does not have to repeat at the same point. One time it can go through without problems and the next time it crashes.

  • CoffeeScript v1.9.3
  • Node Inspector v0.12.6
  • Bugger v2.3.0
  • Chrome OSX v56.0.2924.87

Profile tab: cpu profile chart view colors unreadable

Hey Jan,

I just tried out the latest version and checked the cpu profiler with the chart view. unfortunately the colors are really bad and the text colors are almost the same as the background colors + they seem to have some text-shadow.

In the chrome dev tools this is not the case. I checked the code but couldn't find where they are defined.

Is it possible to stick to the chrome color scheme?

Copy to cUrl etc. not working in network tab

Chrome is not trusting devtools by default (they really have some trust issues with their own scripts). In this case it prevents copy to clipboard to work, there is no fallback (like writing the data to console instead), so the context menu in the Network tab is pretty useless right now.

CPU profiles show no timing information

Reproduce: Hit "Collect JavaScript CPU Profile", do stuff, stop profiling. Be annoyed because nothing useful shows up.

The error console of the devtools shows something like this:

Uncaught TypeError: Cannot read property 'id' of undefined inspector.js:7457
Uncaught TypeError: Object 33025 has no method 'split' inspector.js:3539
43
Uncaught TypeError: Cannot read property 'id' of undefined 

Frequent segmentation faults

If Debugger.enable is sent before Runtime.enable, everything sort of just, breaks.

Not a deal breaker tho, just need to ensure the debugger is enabled before the runtime.

v2 Feature Parity

  • Step-by-step debugging
  • Variable introspection
  • Support for console API
  • Evalute expressions in the console
  • Monitor outgoing http(s) requests your script does (Network tab)
  • Heap snapshots and CPU profiles (Profiles tab)
  • Live edit the running JavaScript code
  • Break on exception
  • Break on uncaught exception
  • --brk to stop at the first line
  • Continue to location
  • Disable/enable all breakpoints
  • Track heap allocations
  • Shows up in chrome://inspect
  • Source maps aren't recognized correctly
  • Forked workers (e.g. via cluster) show up when debugging (not sure if fully possible)

Known issues

  • Reconnecting in paused state does not send the backtrace correctly
  • The timeline tab doesn't do anything useful right now (e.g. console.{time, timeEnd, timeStamp}, network request and heap usage reporting aren't working). Profiling data is collected but not really displayed. #47
  • For babel-core/register and coffee-script/register, editing the files doesn't work (potentially a won't fix) #48
  • Break event handling doesn't report on the breakpoints involved
  • Impossible to pass V8 flags (and other options) into CLI tool

Build fails when adding bugger as a dependency

When i try to run a build on Travis CI, i always get an error as soon as i add bugger 2.3.0 to my package.json.

I am using node v6.7 with npm v3.10.3 on a linux machine (default Travis CI environment for node js projects).

> [email protected] preinstall /home/travis/build/DND-IT/cms-frontend/node_modules/.staging/v8-profiler-a67146e1
> node -e 'process.exit(0)'
> [email protected] install /home/travis/build/DND-IT/cms-frontend/node_modules/bufferutil
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/home/travis/build/DND-IT/cms-frontend/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:0:
../../nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from ../src/bufferutil.cc:7:0:
/home/travis/.node-gyp/6.7.0/include/node/v8.h:345:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/6.7.0/include/node/v8.h:481:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/6.7.0/include/node/v8.h:882:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/6.7.0/include/node/v8.h:5431:35: error: ‘virtual v8::EmbedderHeapTracer::~EmbedderHeapTracer()’ declared virtual cannot be defaulted in the class body
In file included from ../../nan/nan.h:190:0,
                 from ../src/bufferutil.cc:16:
../../nan/nan_maybe_43_inl.h:13:1: error: expected unqualified-id before ‘using’
../../nan/nan_maybe_43_inl.h:16:1: error: expected unqualified-id before ‘using’
../../nan/nan_maybe_43_inl.h:19:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:24:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:31:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:36:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:41:1: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:46:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:51:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:59:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:64:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:69:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:76:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:83:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:91:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:98:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:108:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:114:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:118:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:125:1: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:130:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:135:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:139:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:145:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:150:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:156:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:162:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:168:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:174:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:180:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:186:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:194:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:201:1: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:205:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:209:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:213:8: error: ‘Maybe’ does not name a type
../../nan/nan_maybe_43_inl.h:217:8: error: ‘MaybeLocal’ does not name a type
../../nan/nan_maybe_43_inl.h:237:8: error: ‘MaybeLocal’ does not name a type
In file included from ../../nan/nan.h:195:0,
                 from ../src/bufferutil.cc:16:
../../nan/nan_converters.h:14:11: error: ‘MaybeLocal’ does not name a type
../../nan/nan_converters.h:16:56: error: ‘Maybe’ does not name a type
../../nan/nan_converters.h:26:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:27:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:28:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:29:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:30:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:31:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:32:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:42:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:43:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:44:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:45:1: error: ‘return_t’ does not name a type
../../nan/nan_converters.h:46:1: error: ‘return_t’ does not name a type
In file included from ../../nan/nan_converters.h:59:0,
                 from ../../nan/nan.h:195,
                 from ../src/bufferutil.cc:16:
../../nan/nan_converters_43_inl.h:18:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::Boolean>’ does not name a type
../../nan/nan_converters_43_inl.h:19:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::Number>’ does not name a type
../../nan/nan_converters_43_inl.h:20:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::String>’ does not name a type
../../nan/nan_converters_43_inl.h:21:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::Object>’ does not name a type
../../nan/nan_converters_43_inl.h:22:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::Integer>’ does not name a type
../../nan/nan_converters_43_inl.h:23:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::Uint32>’ does not name a type
../../nan/nan_converters_43_inl.h:24:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<v8::Int32>’ does not name a type
../../nan/nan_converters_43_inl.h:34:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<bool>’ does not name a type
../../nan/nan_converters_43_inl.h:35:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<double>’ does not name a type
../../nan/nan_converters_43_inl.h:36:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<long int>’ does not name a type
../../nan/nan_converters_43_inl.h:37:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<unsigned int>’ does not name a type
../../nan/nan_converters_43_inl.h:38:1: error: ‘return_t’ in ‘struct Nan::imp::ToFactory<int>’ does not name a type
In file included from ../../nan/nan.h:196:0,
                 from ../src/bufferutil.cc:16:
../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]’:
../../nan/nan_new.h:21:32: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../../nan/nan_new.h:21:32: note: candidate is:
../../nan/nan_converters.h:53:38: note: template<class T> typename Nan::imp::ToFactory::return_t Nan::To(v8::Local<v8::Value>)
../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]’:
../../nan/nan_new.h:28:30: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../../nan/nan_new.h:28:30: note: candidate is:
../../nan/nan_converters.h:53:38: note: template<class T> typename Nan::imp::ToFactory::return_t Nan::To(v8::Local<v8::Value>)
../../nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]’:
../../nan/nan_new.h:35:31: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../../nan/nan_new.h:35:31: note: candidate is:
../../nan/nan_converters.h:53:38: note: template<class T> typename Nan::imp::ToFactory::return_t Nan::To(v8::Local<v8::Value>)
../../nan/nan_new.h: At global scope:
../../nan/nan_new.h:43:11: error: ‘MaybeLocal’ does not name a type
../../nan/nan_new.h:75:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:141:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:147:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:148:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:160:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:161:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:162:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:163:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:165:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:166:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:182:17: error: ‘return_t’ does not name a type
../../nan/nan_new.h:183:17: error: ‘return_t’ does not name a type
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:196,
                 from ../src/bufferutil.cc:16:
../../nan/nan_implementation_12_inl.h:61:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::Date>’ does not name a type
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan_implementation_12_inl.h:95:46: error: ‘NewInstance’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::FunctionTemplate>::return_t Nan::imp::Factory<v8::FunctionTemplate>::New(Nan::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>)’:
../../nan/nan_implementation_12_inl.h:123:48: error: ‘NewInstance’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:202:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::RegExp>’ does not name a type
../../nan/nan_implementation_12_inl.h:221:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::Script>’ does not name a type
../../nan/nan_implementation_12_inl.h:227:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::Script>’ does not name a type
../../nan/nan_implementation_12_inl.h:259:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_implementation_12_inl.h:267:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_implementation_12_inl.h:273:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_implementation_12_inl.h:280:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_implementation_12_inl.h:286:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_implementation_12_inl.h:291:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_implementation_12_inl.h:352:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::UnboundScript>’ does not name a type
../../nan/nan_implementation_12_inl.h:359:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::UnboundScript>’ does not name a type
In file included from ../../nan/nan.h:196:0,
                 from ../src/bufferutil.cc:16:
../../nan/nan_new.h:293:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:299:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:305:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:311:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:317:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:323:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:329:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::String>’ does not name a type
../../nan/nan_new.h:335:1: error: ‘return_t’ in ‘struct Nan::imp::Factory<v8::RegExp>’ does not name a type
In file included from ../src/bufferutil.cc:16:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Error(const char*)’:
../../nan/nan.h:655:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::ThrowError(const char*)’:
../../nan/nan.h:655:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::RangeError(const char*)’:
../../nan/nan.h:656:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::ThrowRangeError(const char*)’:
../../nan/nan.h:656:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::ReferenceError(const char*)’:
../../nan/nan.h:657:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::ThrowReferenceError(const char*)’:
../../nan/nan.h:657:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::SyntaxError(const char*)’:
../../nan/nan.h:658:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::ThrowSyntaxError(const char*)’:
../../nan/nan.h:658:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::TypeError(const char*)’:
../../nan/nan.h:659:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::ThrowTypeError(const char*)’:
../../nan/nan.h:659:3: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: At global scope:
../../nan/nan.h:667:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:689:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:705:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:718:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:735:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:741:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:749:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:756:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:762:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1507:41: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../../nan/nan.h:1525:45: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In member function ‘virtual void Nan::AsyncWorker::HandleErrorCallback()’:
../../nan/nan.h:1559:58: error: no matching function for call to ‘New(const char*)’
../../nan/nan.h:1559:58: note: candidates are:
../../nan/nan_implementation_12_inl.h:395:21: note: template<class T, class M> v8::Local<T> Nan::New(const v8::Persistent<S, M>&)
../../nan/nan_implementation_12_inl.h:400:21: note: template<class T, class M> v8::Local<T> Nan::New(const Nan::Persistent<T, M>&)
../../nan/nan_implementation_12_inl.h:405:21: note: template<class T> v8::Local<T> Nan::New(const Nan::Global<T>&)
../../nan/nan_new.h:201:1: note: template<class T> typename Nan::imp::Factory::return_t Nan::New()
../../nan/nan_new.h:207:1: note: template<class T, class A0> typename Nan::imp::Factory<T>::return_t Nan::New(A0)
../../nan/nan_new.h:213:1: note: template<class T, class A0, class A1> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1)
../../nan/nan_new.h:219:1: note: template<class T, class A0, class A1, class A2> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1, A2)
../../nan/nan_new.h:225:1: note: template<class T, class A0, class A1, class A2, class A3> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1, A2, A3)
../../nan/nan_new.h:237:1: note: template<class T> typename Nan::imp::Factory::return_t Nan::New(Nan::FunctionCallback, v8::Local<v8::Value>)
../../nan/nan_new.h:245:1: note: template<class T, class A2> typename Nan::imp::Factory<T>::return_t Nan::New(Nan::FunctionCallback, v8::Local<v8::Value>, A2)
../../nan/nan.h: In function ‘void Nan::imp::SetMethodAux(T, v8::Local<v8::String>, v8::Local<v8::FunctionTemplate>, ...)’:
../../nan/nan.h:1870:34: error: there are no arguments to ‘GetFunction’ that depend on a template parameter, so a declaration of ‘GetFunction’ must be available [-fpermissive]
../../nan/nan.h:1870:34: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../nan/nan.h: In function ‘void Nan::SetMethod(HandleType<T>, const char*, Nan::FunctionCallback)’:
../../nan/nan.h:1882:45: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, Nan::FunctionCallback)’:
../../nan/nan.h:1897:45: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../../nan/nan.h:1922:47: error: ‘NewInstance’ was not declared in this scope
../../nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../../nan/nan.h:1965:51: error: ‘NewInstance’ was not declared in this scope
../../nan/nan.h: In function ‘void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, Nan::PropertyGetterCallback, Nan::PropertySetterCallback, Nan::PropertyQueryCallback, Nan::PropertyDeleterCallback, Nan::PropertyEnumeratorCallback, v8::Local<v8::Value>)’:
../../nan/nan.h:2024:47: error: ‘NewInstance’ was not declared in this scope
../../nan/nan.h: In function ‘void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, Nan::IndexGetterCallback, Nan::IndexSetterCallback, Nan::IndexQueryCallback, Nan::IndexDeleterCallback, Nan::IndexEnumeratorCallback, v8::Local<v8::Value>)’:
../../nan/nan.h:2094:47: error: ‘NewInstance’ was not declared in this scope
../../nan/nan.h: In function ‘void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate>, Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan.h:2149:47: error: ‘NewInstance’ was not declared in this scope
../../nan/nan.h: In function ‘void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate>, Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan.h:2171:47: error: ‘NewInstance’ was not declared in this scope
In file included from ../src/bufferutil.cc:16:0:
../../nan/nan.h: In function ‘void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, Nan::FunctionCallback)’:
../../nan/nan.h:2198:35: error: no matching function for call to ‘New(const char*&)’
../../nan/nan.h:2198:35: note: candidates are:
../../nan/nan_implementation_12_inl.h:395:21: note: template<class T, class M> v8::Local<T> Nan::New(const v8::Persistent<S, M>&)
../../nan/nan_implementation_12_inl.h:400:21: note: template<class T, class M> v8::Local<T> Nan::New(const Nan::Persistent<T, M>&)
../../nan/nan_implementation_12_inl.h:405:21: note: template<class T> v8::Local<T> Nan::New(const Nan::Global<T>&)
../../nan/nan_new.h:201:1: note: template<class T> typename Nan::imp::Factory::return_t Nan::New()
../../nan/nan_new.h:207:1: note: template<class T, class A0> typename Nan::imp::Factory<T>::return_t Nan::New(A0)
../../nan/nan_new.h:213:1: note: template<class T, class A0, class A1> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1)
../../nan/nan_new.h:219:1: note: template<class T, class A0, class A1, class A2> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1, A2)
../../nan/nan_new.h:225:1: note: template<class T, class A0, class A1, class A2, class A3> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1, A2, A3)
../../nan/nan_new.h:237:1: note: template<class T> typename Nan::imp::Factory::return_t Nan::New(Nan::FunctionCallback, v8::Local<v8::Value>)
../../nan/nan_new.h:245:1: note: template<class T, class A2> typename Nan::imp::Factory<T>::return_t Nan::New(Nan::FunctionCallback, v8::Local<v8::Value>, A2)
../../nan/nan.h:2199:47: error: ‘GetFunction’ was not declared in this scope
../../nan/nan.h:2199:65: error: ‘Set’ was not declared in this scope
../../nan/nan.h:2199:65: note: suggested alternative:
/home/travis/.node-gyp/6.7.0/include/node/v8.h:3087:17: note:   ‘v8::Set’
../../nan/nan.h: In constructor ‘Nan::Tap::Tap(v8::Local<v8::Value>)’:
../../nan/nan.h:2206:30: error: no matching function for call to ‘To(v8::Local<v8::Value>&)’
../../nan/nan.h:2206:30: note: candidate is:
../../nan/nan_converters.h:53:38: note: template<class T> typename Nan::imp::ToFactory::return_t Nan::To(v8::Local<v8::Value>)
../../nan/nan.h: In member function ‘void Nan::Tap::ok(bool, const char*)’:
../../nan/nan.h:2219:33: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: In member function ‘void Nan::Tap::pass(const char*)’:
../../nan/nan.h:2225:30: error: ‘Nan::imp::FactoryBase<v8::Boolean>::return_t’ has no member named ‘ToLocalChecked’
../../nan/nan.h: At global scope:
../../nan/nan.h:2249:10: error: ‘MaybeLocal’ does not name a type
../../nan/nan.h:2254:40: error: ‘MaybeLocal’ was not declared in this scope
../../nan/nan.h:2254:40: note: suggested alternative:
/home/travis/.node-gyp/6.7.0/include/node/v8.h:115:7: note:   ‘v8::MaybeLocal’
../../nan/nan.h:2254:52: error: template argument 1 is invalid
../../nan/nan.h:2254:54: error: expected unqualified-id before ‘>’ token
../../nan/nan.h:2263:1: error: ‘MaybeLocal’ does not name a type
../src/bufferutil.cc:25:30: error: ‘v8::Handle’ has not been declared
../src/bufferutil.cc:25:36: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/bufferutil.cc: In static member function ‘static void BufferUtil::Initialize(int)’:
../src/bufferutil.cc:33:5: error: ‘Set’ is not a member of ‘Nan’
../src/bufferutil.cc:33:5: note: suggested alternatives:
/home/travis/.node-gyp/6.7.0/include/node/v8.h:3087:17: note:   ‘v8::Set’
/home/travis/.node-gyp/6.7.0/include/node/v8.h:3087:17: note:   ‘v8::Set’
../src/bufferutil.cc:33:14: error: ‘target’ was not declared in this scope
../src/bufferutil.cc:33:51: error: no matching function for call to ‘New(const char [11])’
../src/bufferutil.cc:33:51: note: candidates are:
../../nan/nan_implementation_12_inl.h:395:21: note: template<class T, class M> v8::Local<T> Nan::New(const v8::Persistent<S, M>&)
../../nan/nan_implementation_12_inl.h:400:21: note: template<class T, class M> v8::Local<T> Nan::New(const Nan::Persistent<T, M>&)
../../nan/nan_implementation_12_inl.h:405:21: note: template<class T> v8::Local<T> Nan::New(const Nan::Global<T>&)
../../nan/nan_new.h:201:1: note: template<class T> typename Nan::imp::Factory::return_t Nan::New()
../../nan/nan_new.h:207:1: note: template<class T, class A0> typename Nan::imp::Factory<T>::return_t Nan::New(A0)
../../nan/nan_new.h:213:1: note: template<class T, class A0, class A1> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1)
../../nan/nan_new.h:219:1: note: template<class T, class A0, class A1, class A2> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1, A2)
../../nan/nan_new.h:225:1: note: template<class T, class A0, class A1, class A2, class A3> typename Nan::imp::Factory<T>::return_t Nan::New(A0, A1, A2, A3)
../../nan/nan_new.h:237:1: note: template<class T> typename Nan::imp::Factory::return_t Nan::New(Nan::FunctionCallback, v8::Local<v8::Value>)
../../nan/nan_new.h:245:1: note: template<class T, class A2> typename Nan::imp::Factory<T>::return_t Nan::New(Nan::FunctionCallback, v8::Local<v8::Value>, A2)
../src/bufferutil.cc: At global scope:
../src/bufferutil.cc:114:12: error: variable or field ‘init’ declared void
../src/bufferutil.cc:114:12: error: ‘Handle’ was not declared in this scope
../src/bufferutil.cc:114:25: error: expected primary-expression before ‘>’ token
../src/bufferutil.cc:114:27: error: ‘target’ was not declared in this scope
../src/bufferutil.cc:120:1: error: ‘init’ was not declared in this scope
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory `/home/travis/build/DND-IT/cms-frontend/node_modules/bufferutil/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/travis/.nvm/versions/node/v6.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.13.0-40-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v6.7.0/bin/node" "/home/travis/.nvm/versions/node/v6.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/travis/build/DND-IT/cms-frontend/node_modules/bufferutil
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1

TypeError: Path must be a string

I am running bugger app.js, then open the printed link into Chrome, Chrome then says "Debugging connection terminated, reason: websocket_closed" and I then see the following error in my terminal:

   TypeError: Path must be a string. Received undefined
       at assertPath (path.js:7:11)
       at Object.dirname (path.js:1326:5)
       at Module._compile (/usr/local/lib/node_modules/bugger/lib/cli.js:80:24)
       at _createContext (/usr/local/lib/node_modules/bugger/lib/agents/runtime/index.js:26:5)
       at new RuntimeAgent (/usr/local/lib/node_modules/bugger/lib/agents/runtime/index.js:40:25)
       at new Agents (/usr/local/lib/node_modules/bugger/lib/agents.js:42:21)
       at setupAgents (/usr/local/lib/node_modules/bugger/lib/bugger.js:50:20)
       at Thread.onDevtoolsMessage (/usr/local/lib/node_modules/bugger/lib/bugger.js:78:7)
       at emitOne (events.js:96:13)
       at Thread.emit (events.js:188:7)
       at Thread._handle.message (/usr/local/lib/node_modules/bugger/lib/thread.js:12:12) }

I tried the following, but no luck:

bugger ./app.js
bugger "./app.js"

Cannot run any console commands when in breakpoint

No matter what console command I run, I get this error message:

Uncaught ReferenceError
message: "__buggerCLI is not defined"
stack: (...)
get stack: ()
set stack: ()

I am running jest tests with the following command:

node --harmony $(which bugger) ./node_modules/jest-cli/bin/jest.js --runInBand

Also tried to use this command:

bugger ./node_modules/jest-cli/bin/jest.js  #--runInBand

How can I use this with Babel?

Hey there. I'm a non javascript developer that recently inherited a js project. Bugger was recommended by the previous developer. I can run my project's es6 test suite by doing bugger ./node_modules/.bin/_mocha. And it seems like the transpilation happens on the fly just fine. But I can't figure out how to run an individual file. I can do babel-node test/load_test.js, but bugger test/load_test.js obviously doesn't work. Is there a way to do something like bugger --babel-node test/load_test.js? I don't see anything along these lines in the readme.

Sorry if opening a ticket is inappropriate for this question :)

Can't even install this?

NPM is telling me that node-gyp rebuild fails for the v8-profiler package.

Are there plans to fix this?

Unintentional license?

I see that package.json is essentially default generated with even author name missing, would you mind explicitly stating the license (license.md or similar)?

It came up a lot with amok when it was becoming semi-popular and by proxy it will be brought up here when i release 2.0 with node support via bugger.

Allow restarting the process when it is done running

Right now after the process ended (e.g. it just crashed or hit end of logic) bugger needs to be killed or is pretty useless. There should be a :reload command in the terminal (and :help, for that matter). This command should also work anytime.

Environment or Configuration Error?

Trying to run bugger against a short test file and am immediately getting the following error on Windows 7, node v0.10.10:

C:\Users\paul\Desktop\express-simple>bugger index.js
[bugger] Debugging index.js
[bugger] chrome://devtools/devtools.html?ws=127.0.0.1:8058/websocket

C:\Users\paul\AppData\Roaming\npm\node_modules\bugger\lib\bug-script\probes\coffee.js:5
coffee.register();
       ^
TypeError: Object #<Object> has no method 'register'
    at Object.<anonymous> (C:\Users\paul\AppData\Roaming\npm\node_modules\bugger\lib\bug-script\probes\coffee.js:5:8)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at mainModule (C:\Users\paul\AppData\Roaming\npm\node_modules\bugger\lib\bug-script\child.js:34:10)
    at Array.forEach (native)
    at Object.<anonymous> (C:\Users\paul\AppData\Roaming\npm\node_modules\bugger\lib\bug-script\child.js:32:21)

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: read ECONNRESET
    at errnoException (net.js:884:11)
    at TCP.onread (net.js:539:19)

index.js:

console.log('test');

Any ideas?

Q: source tab - file - "reveal in navigator" menu item possible to have?

Hi Jan,

in the chrome dev tools source tab, when a file is open one can right click on the file's tab and select "reveal in navigator" which will focus on the file.

This functionality is really nice to have.
E.g files tend to have common names like "index.js" or "utils.js". When profiling one can click at the file code line, which will open the file the source tab. The problem is that one doesn't know where the file is located.

Is it possible to get this functionality to the source panel?

"undefined" network:183

/usr/local/share/npm/lib/node_modules/bugger/lib/bug-script/probes/network.js:183
        return cb(cRes);
               ^
TypeError: undefined is not a function
    at ClientRequest.patchedClientResponseCallback (/usr/local/share/npm/lib/node_modules/bugger/lib/bug-script/probes/network.js:183:16)
    at ClientRequest.g (events.js:175:14)
    at ClientRequest.EventEmitter.emit (events.js:117:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1658:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:119:23)
    at CleartextStream.socketOnData [as ondata] (http.js:1553:20)
    at CleartextStream.read [as _read] (tls.js:502:12)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.write [as _write] (tls.js:366:25)
    at doWrite (_stream_writable.js:219:10)

Make url point to the entry script

Hey @jkrems.

Minor nit issue, /json/list returns file://(...)/node_modules/bugger/lib/io-thread/index.js as the url. Would make more sense if it returned the entry script?

Unable to pass arguments to Node.js

I'd like to pass arguments to node, such as --expose-gc (which might make a nice default; we are debugging after all!)

$ bugger --bugger-arg app.js -- --script-arg

As it stands, providing arguments which bugger doesn't understand prevents it from executing. Perhaps unrecognized arguments could be passed along to node?

double attributes

Hey, first of all: Awesome tool!!!
Really convenient to use, way better then node inspector.

When I console.log variables, all their attributes are shown double.
I'm using node v 0.10.26

screen shot 2014-03-04 at 00 15 29

If you need more information, just ask.

Thanks

process.dlopen on Windows

I get this error when trying to use this under Windows 7:

[bugger] Debugging flk.coffee
[bugger] chrome-devtools://devtools/bundled/devtools.html?ws=127.0.0.1:8058/websocket&toolbarColor=rgba(230,230,230,1)&textColor=rgba(0,0,0,1)

module.js:485
process.dlopen(filename, module.exports);
^
Error: %1 is not a valid Win32 application.

Add .buggerc support

Maybe consider having some sort of defaults-file (home directory or in project) that can be used to shorten the command being run or alter the defaults. E.g. making --watch default or by default starting without a break point.

Support live edit for require hooks

For babel-core/register and coffee-script/register, editing the files doesn't work currently. They don't even show up with source maps.

This is potentially a won't fix.

Notifications are not buffered?

It seems that notifications are not buffered like they are in chromium based implementations.

Here's a small example, I'll leave out the code as it isn't that relevant, rather I'll dump the request/response data from node-rdbg.

TAP version 13
# spawn
stdout: 'chrome-devtools://devtools/bundled/inspector.html?ws=127.0.0.1:4000/websocket'
stdout: 'console log'
RDBG 38874: connect
RDBG 38874: request { id: 0, method: 'Console.enable', params: {} }
RDBG 38874: message { method: 'Debugger.scriptParsed',
  params: 
   { scriptId: '236',
     url: 'file:///usr/local/lib/node_modules/bugger/lib/agents/console/index.js',
     lineCount: 103,
     sourceOffset: { line: 0, column: 0 },
     context: null,
     evalContext: null } }
RDBG 38874: response { id: 0, method: 'Console.enable', params: {} }, { id: 0, error: null }

So there are two things going "wrong" here. Or they are at-least behaving differently from the spec.

  • I have not called Debugger.enable, yet I am getting scriptParsed notifications.
  • I am not getting Console.messageAdded notifications for the console messages that occurred before Console.enable is called.

Mirroring dates, regexes

A few more instances of description field "lacking" compared to what chrome reports

For example, regexes

{ type: 'object',
  objectId: '{"injectedScriptId":1,"id":1}',
  subtype: 'regexp',
  className: 'RegExp',
  description: '/asd/' }

vs

{ type: 'object',
  objectId: 'mirror:undefined:4',
  className: 'RegExp',
  description: 'RegExp' }

Dates are the same story

{ type: 'object',
  objectId: '{"injectedScriptId":1,"id":3}',
  subtype: 'date',
  className: 'Date',
  description: 'Mon Mar 21 2016 14:08:10 GMT+0800 (PHT)' }

vs

{ type: 'object',
  objectId: 'mirror:undefined:4',
  className: 'Date',
  description: 'Date' }

The subtype field seems to be missing for quite a few of the types too, like Map, Symbol.

Unable to install

get the following

> [email protected] install /usr/local/lib/node_modules/bugger
> node-gyp rebuild

  CXX(target) Release/obj.target/DebugThread/src/module.o
  CXX(target) Release/obj.target/DebugThread/src/thread.o
../src/thread.cc:131:50: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> thread_api = tpl->GetFunction()->NewInstance();
                                                 ^
/Users/oismail/.node-gyp/7.9.0/include/node/v8.h:3662:52: note: 'NewInstance' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                   ^
../src/thread.cc:172:22: error: too many arguments to function call, expected 6, have 7
        argv.size(), argv.data());
                     ^~~~~~~~~~~
/Users/oismail/.node-gyp/7.9.0/include/node/node.h:203:13: note: 'CreateEnvironment' declared here
NODE_EXTERN Environment* CreateEnvironment(IsolateData* isolate_data,
            ^
1 warning and 1 error generated.
make: *** [Release/obj.target/DebugThread/src/thread.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.0.0
gyp ERR! command "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/bugger
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bugger package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bugger
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bugger
npm ERR! There is likely additional logging output above.

I'm running latest node and npm (node 7.9.0, npm 4.5.0)

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.