Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Visual Studio Code 0.10.8 release features a palpable plethora of improvements, including...
We are now using a tree in the debug hover to allow better rich object inspection:
We now support setting conditional breakpoints that are hit only when the specified condition is true
. Please note, the underlying debug target, such as Node.js, must support conditional breakpoints for this feature to work.
We now indicate in the Debug and Watch views which variables have changed values between step events.
Node.js debugging now supports source maps with "inlined source" in addition to "inlined source maps" which were already supported. To avoid confusion, here is a brief explanation of these two source map options. "Inlined source" and "inlined source maps" are orthogonal features and VS Code supports both either alone or in combination:
The strategy for which situations VS Code will use "inlined source" is as follows:
Whenever the editor contents is not loaded from the file system but comes from the debugger backend, the editor will be in read-only mode and the "origin" of the editor contents is shown in the editor title like this:
The followings improvements enable VS Code to support remote debugging, includes debugging into a Docker container:
attach
launch configuration now supports an address
attribute where a remote host can be specified. Please note that remote debugging is only supported on recent versions of Node.js (>= 4.x).attach
launch configuration now supports a localRoot
and a remoteRoot
attribute that can be used to map paths between a local VS Code project and a (remote) Node.js folder. This works even locally on the same system or across different operating systems. Whenever a code path needs to be converted from the remote Node.js to a local VS Code path, the remoteRoot
path is stripped off the path and replaced by localRoot
. For the reverse conversion, the localRoot
path is replaced by the remoteRoot
.In order to achieve consistency across our configuration files, we plan for the February release to no longer automatically convert certain paths from relative to absolute in launch.json
. We recommend that for the program
, cwd
, outDir
, and runtimeExecutable
attributes, you prefix your relative paths with the${workspaceRoot}
variable as soon as possible. To make it easier for you to find the affected paths that need this treatment, we highlight them with a green squigglies for the January release. (Please note: since we continue to automatically convert paths for the January release, your launch configurations will continue to work).
In order to make sure that breakpoints are hit reliably, VS Code automatically added the --nolazy
option when launching Node.js. With the advent of Node.js alternatives that do not support this option (e.g. Chakra), we've removed this automatic behavior. If you see that breakpoints are not hit reliably in Node.js applications, please verify that your launch configuration sets the --nolazy
option explicitly via theruntimeArgs
attribute.
For VS Code Mono debugging support, we've added an externalConsole
attribute, which controls whether the Mono target application is launched in an external console or in the built-in Debug Console (the default). Please note that the built-in Debug Console does not support keyboard input for your application.
We now show the debug consoles horizontally:
We have changed the debug protocol in the following (backward compatible) ways:
InitializeRequest
now returns information about the capabilities of the debug adapter. The VS Code debugger uses this information to enable or configure features which only exist for certain debug adapters.ConfigurationDoneRequest
: VS Code sends this request to indicate that the configuration (e.g. registering stored breakpoints and exception options) of the debug session has finished and that debugging is about to start. For backward compatibility, VS Code will send this request only if the debug adapter returns a value of true
for thesupportsConfigurationDoneRequest
capability.Source
type:
origin
attribute to provide additional information about the source in the debug UI.adapterData
attribute that the VS Code debug UI will transparently persist for breakpoints.SourceBreakpoint
: an array of SourceBreakpoint
is an alternate means to specify the individual breakpoints for the SetBreakpointsRequest
. The SourceBreakpoint
allows for specifying column and condition information for a breakpoint (in addition to the line).With the January release, we've started to simplify the process of writing automated tests for a debug adapter. The basic idea is to provide a toolkit with Promise-based building blocks for individual protocol requests (e.g. stepInRequest
) and for common request sequences (e.g. hitBreakpoint
). These building blocks can be easily configured for a specific adapter and combined to form complex scenarios.
Here are three example Mocha tests:
var dc: DebugClient = ...; test('should run program to the end', () => { return Promise.all([ dc.configurationSequence(), dc.launch({ program: "main.js" }), dc.waitForEvent('terminated') ]); }); test('should stop on entry', () => { return Promise.all([ dc.configurationSequence(), dc.launch({ program: "main.js", stopOnEntry: true }), dc.assertStoppedLocation('entry', 1) ]); }); test('should set a breakpoint and stop on it', () => { return dc.hitBreakpoint({ program: "main.js" }, "test.js", 15); });
More examples can be found in these debug adapter projects on GitHub:
You can see the Promise-based API in DebugClient.ts and an initial set of tests in adapter.test.ts. We plan to make this API available as an npm module in February.
Check out all the new features and update to Visual Studio Code v0.10.9:
https://code.visualstudio.com/updates
Have a good buy! Have a great buy.
- Ninja Ed
Please sign in to use this experience.
Sign in