Checked: subtype of Array is array
Checked: subtype of Date is date, type is object
Checked: subtype of RegExp is regexp, type is object
Checked: subtype of null is null
Checked: Ref object contains protoObject, but not proto
Checked: Uninformative proto object in scope
Checked: Uninformative null proto object
Checked: Uisplaying undefined proto what placed in properties
Before this change, ScriptFileStorage.load was returning source code
including shebang (#!/usr/bin/node). This prevented the front-end
from matching the file on disk with the script loaded in Node/V8.
As a result, `node-debug _mocha` did not show the breakpoint in
the _mocha file.
ScriptFileStorage.save is preserving shebang when saving the updated
file now, so that live edit works as expected.
DevTools front-end expects to receive Page.getResourceTree response
before any "scriptParsed" events. When "scriptParsed" arrives first,
the source-map handler throws an exception.
Add FrontendClient methods pauseEvents() and resumeEvents().
Change PageAgent to EventEmitter, add a "resource-tree" event that
is emitted at the time when the Page.getResourceTree response is sent.
FrontendCommandHandler uses these two features to pause events on start
and resume them on "resource-tree".
Refactor lib/config and bin/inspector, split printHelpAndExit into
two parts. The first part is building the help message and stays in
lib/config as `config._describeOptions`. The second part (print and
exit) is moved to bin/inspector.
`ScriptManager._getSourceMapUrl` accepts an optional parameter
`scriptSource`.
`DebuggerAgent._reloadScript` asks V8 to include script sources
in the response.
This way it's not necessary to send another request for each script
that is loaded by V8 at the time when Node Inspector is attaching to
the process.
When the directory does not contain package.json, limit the traversal
to top level javascript files and well-known subdirectories:
lib/
node_modules/
test/
This should prevent unintentionaly broad searches like
all files in C:\ drive.
WebSocketServer emits the errors raised by the underlying http.Server,
thus we have to detect and prevent the situation when a single error
is reported twice.
Convert V8 object with type='error' to DevTools object with
type='object'. This fixes the problem where Error values
were displayed as "undefined" in the front-end.
Changed the socket implementation to use WS-server, and added
utility function to generate the web socket url with the correct
protocol and relative path.
The new option `stackTraceLimit`, like the corresponding option in
Chrome, allows us to specify how many stack frames we want when
stopped at a breakpoint. It can be set as high as you like.
Negative numbers will cause an error.
The default number of frames is set to 50 to prevent possible
performance issues; if you wish to capture all frames, no matter the
consequences, set this option to a high number, like `99999`.
The upgraded front-end sends two requests to get a list of object properties,
each request asking for a different set of variables. Because our back-end was
ignoring request parameters, the same set of variables was returned twice.
This commit fixes the immediate problem, without providing the full
implementation of the new front-end feature.
Modified ScriptFileStorage.findAllApplicationScripts() to exclude files to
hide.
Modified ScriptManager to never hide the main application script file.
- Registered additional no-op commands
- Added `column` property to console log messages
- Disabled warning about changes not persisted to filesystem
- Added `hitBreakpoints` to `Debugger.paused` message
- Simplified Debugger._handleChangeLiveOrRestartFrameResponse by removing
stepIntoAndSendResponse(), as this is handled by front-end now
- Removed patch for `loadXHR()` and implememented source-maps loading using
the new command `Network.loadResourceForFrontend`.
Modified DebugServer to emit 'listening' and 'error' events, added address()
function for getting the server's address. Moved console logs from DebugServer
to bin/inspector.js.
Modified CLI runner (bin/inspector.js) to forward DebugServer events to
the parent process via `process.send`.
Started embedding guide in `docs/embedding.md`.
Fixed a bug where Node Inspector crashed when a breakpoint was hit in a code
run by eval(). This is happening in two cases:
- Node Inspector calls eval() to get more information about the debugged
process. In certain circumstances it was possible that the debugger stopped
inside this code.
- User types `debugger;` in the console panel.
BreakEventHandler was changed to resume the execution in both cases, as if
the sources were hidden.
Fixed the way how we detect the main application file for two cases:
`node .` (run the local application)
`node --debug` (start an interactive REPL session)
Fixed also other issues that prevented debugging of REPL sessions.
Added a startup hook that opens the main application file in case no files
are opened.
Created a public API for embedders, added function buildInspectorUrl().
Modified callFunctionOn() to report errors inside evaluated script as
a success response with `wasThrown: true` instead of throwing an error.
Fixed issue strongloop/node-inspector#26.
Improved detection of application's root folder to handle better the case
when we are debugging a simple application with no node_modules/lib/test
subfolder.