Giter VIP home page Giter VIP logo

vscode-js-debug's Introduction

vscode-js-debug

This is a DAP-based JavaScript debugger. It debugs Node.js, Chrome, Edge, WebView2, VS Code extensions, and more. It has been the default JavaScript debugger in Visual Studio Code since 1.46, and is gradually rolling out in Visual Studio proper.

Nightly Extension

The shipped version of VS Code includes the js-debug version at the time of its release, however you may want to install our nightly build to get the latest fixes and features. The nightly build runs at 5PM PST on each day that there are changes (see pipeline). To get the build:

  1. Open the extensions view (ctrl+shift+x) and search for @builtin @id:ms-vscode.js-debug
  2. Right click on the JavaScript Debugger extension and Disable it.
  3. Search for @id:ms-vscode.js-debug-nightly in the extensions view.
  4. Install that extension.

What's new?

In js-debug we aim to provide rich debugging for modern applications, with no or minimal configuration required. Here are a few new features that js-debug brings:

Debug child process and workers

In Node.js, child processes will automatically be debugged. In browsers, service workers, webworkers, and iframes will be debugged as well.

While debugging workers, you can also step through postMessage() calls.

Debug Node.js processes in the terminal

You can debug any Node.js process you run in the terminal with our revamped Auto Attach. If auto attach isn't on, you can run the command Debug: Toggle Auto Attach to turn it on. Next time you run a command like npm start, we'll debug it.

Once enabled, you can toggle Auto Attach by clicking the Auto Attach: On/Off button in the status bar on the bottom of your screen.

You can also create a one-off terminal for debugging via the Debug: Create JavaScript Debug Terminal command.

In the previous debugger, you had to remember to add the --inspect flag when you ran a command, and couldn't hit breakpoints early in the program since attachment was asynchronous.

Profiling Support

You can capture and view performance profiles natively in VS Code, by clicking on the ⚪ button in the Call Stack view, or through the Debug: Take Performance Profile command. The profile information collected through VS Code is sourcemap-aware.

Easy npm script debugging

You can debug npm scripts by clicking the code lens shown in the package.json, or by running the Debug: Debug NPM Script command/

You can configure where and if the code lens is displayed in the debug.javascript.codelens.npmScripts setting.

Automatic browser debugging

By default, any links you click through the JavaScript debug terminal (Debug: Create JavaScript Debug Terminal command) will open in debug mode. If you'd like, you can enable this for all terminals, or disable it, by setting debug.javascript.debugByLinkOptions to always or off, respectively.

Instrumentation breakpoints

When debugging web apps, you can configure instrumentation breakpoints from VS Code in the "Event Listener Breakpoints" view.

Better autocompletion in debug console

Autocomplete in the debug console has been significantly improved. You can expect better suggestions for more complex expressions than VS Code was able to handle before.

Return value interception

On a function's return statement, you can use, inspect, and modify the $returnValue.

Note that you can use and modify properties on the $returnValue, but not assign it to--it is effectively a const variable.

Top-Level await

You can use await at the top level in the debug console.

However, like the Chrome devtools, if you use await while paused on a breakpoint, you'll only get a pending Promise back. This is because the JavaScript event loop is paused while on a breakpoint.

Pretty-print minified sources

The debugger can now pretty print files, especially useful when dealing with minified sources. It will show a prompt when you step into or open a file that looks minified, and you can also trigger pretty printing manually via the Debug: Pretty print for debugging command.

Click to view gif

You can turn off the suggestion prompt by selecting Never, or changing the setting debug.javascript.suggestPrettyPrinting to false.

Support for Microsoft Edge and WebView2

We support launching the new Microsoft Edge browser, via the pwa-msedge debug type. It supports all the same configuration settings as chrome does.

With this comes support for the WebView2 control in desktop Windows applications. Check out our webview demo to learn how to set this up.

Better sourcemap and breakpoint behavior

Js-debug has a rewritten suite of sourcemap handling and breakpoint resolution logic. This results in more reliable breakpoint behavior in more cases. For example:

  • We are guaranteed to set breakpoints before hitting them, where there were previously scenarios where this did not happen.
  • We can handle sources present in multiple compiled files. This is common when dealing with split bundles in web apps.
  • We now support in-place transpilation (such as ts-node and @babel/register).

Copy values in call stack view

VS Code has long had an action to "Copy Value" from the Variables view. However, previously this was truncated for object or long values. Changes in VS Code and js-debug allow us to losslessly copy the full expressions as JSON.

Other small things

js-debug is a cleanroom rewrite of a JavaScript debugger, so there are a large number of small improvements. Here are some more that are unworthy of their own heading:

  • Console output is now improved. Promises, ArrayViews/ArrayBuffers, and other complex data structures are better supported.
  • Logpoint breakpoints now support complex expressions and statements. Errors thrown will be printed, rather than silently eaten.
  • You can now specify partial versions in the Node.js runtimeVersion. Previously you needed to specify the full version, such as 12.3.4. Now, you can specify 12 and we'll use the most recent 12.* installed on the system.
  • Sourcemaps are now supported when attaching via the Attach to Node.js Process command.
  • Several improvements have been made for faster performance and better out-of-the-box behavior in monorepos and multi-part applications.
  • The console.group() set of APIs are now supported.
  • You can pass stable, canary, or dev as runtimeExecutables when launching browsers. We'll do our best to discover and use the specified version on your machine.
  • You can now set the Node.js program to files with other or no extensions without workarounds.
  • Restart frame requests are now supported.
  • Command line APIs like inspect() and copy() are now available.

Options

See OPTIONS.md

vscode-js-debug's People

Contributors

alexr00 avatar ashgti avatar aslushnikov avatar cbmd avatar connor4312 avatar dependabot[bot] avatar dgozman avatar digeff avatar ericcornelson avatar jakebailey avatar jasonwilliams avatar johnemau avatar joyceerhl avatar liuxingbaoyu avatar lszomoru avatar microsoftopensource avatar onesandzer0s avatar pavelfeldman avatar pilaoda avatar rinselmann avatar roblourens avatar rzhao271 avatar segevfiner avatar shenniey avatar swissmanu avatar thales-maciel avatar thaystg avatar timvahlbrock avatar tylerleonhardt avatar zjffun 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  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

vscode-js-debug's Issues

Setting to deactivate "All Exceptions" breaking for first few seconds of a debug session

Feature Request: could we add a delayAllExceptionsBreakpointsMsecs: number setting to launch.json for node debugging? If the "All Exceptions" breakpoint setting is enabled and this setting is present, VSCode would not break on exceptions within the first N msecs of a debug session. Note that this setting shouldn't affect uncaught exceptions, only caught exceptions if the "All Exceptions" breakpoint setting is enabled.

Justification

Many JavaScript frameworks catch and handle all thrown exceptions so that they can display custom error UI. This makes the "uncaught exceptions" breakpoint useless. You need to use "All Exceptions" breakpoints instead. But then you run into 10-100 "normal exceptions" when starting every debug session, because many libraries intentionally throw exceptions as part of their startup process. For example:

  • The json3 library, used all over the place (e.g. webpack dev server), always throws 2+ exceptions at startup while checking browser compatibility.
  • Facebook's JS SDK also throws exceptions on startup when checking for browser JSON parsing support.
  • react-select, a common dropdown-UI library, always throws an exception at startup, also to check browser compatibility
  • react itself throws exceptions for warnings about various components not following best practices.
  • Node's dynamic resolver code throws exceptions when a module isn't loaded yet, and catches the exception to load the module.
  • The bluebird promise library (used by npm CLI) throws a few exceptions as part of its startup

I could keep going, but you get the idea. What all these have in common is that they happen in the first few seconds of a debug session, before any of the code runs that I'm actually trying to debug!

If we had the ability to simply not break during those first few seconds, it'd save me 1+ minutes at the start of every debug session!

BTW, I know about the the "skipFiles" option
(https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_skipping-uninteresting-code-node-chrome) which is somewhat helpful, but this feature has a few problems:

  • Exceptions continue to propagate up the stack. The file may be ignored, but not the exception. So, for example, instead of the IDE breaking at the call site in the json3 library, it will break somewhere in a huge transpiled webpack bundle file, which takes 10+ seconds to load into the editor because the file is so huge.
  • File-level granularity is too coarse. Ignoring entire files might be risky because then I could miss real exceptions later. For example, there's no way that I'd want to ignore "real" exceptions from react or from the Facebook SDK!
  • For scripts loaded over HTTP (not from disk), like the FB SDK or a webpack bundle file, you can't specify the entire URL path, only the filename part (e.g. "sdk.js" or "bundle.js"). Woe to you if you have two downloaded SDKs both called "sdk.js" !

A more granular alternative solution, like the "anti-breakpoint" proposal at microsoft/vscode#53795, would also solve this problem, but I assume it'd be much harder to implement than an exception delay-- both on the VSCode side and from users. Also, a problem with this approach is that it wouldn't work for bundle files where the row/col would change from one debug session to the next.

Failures running the server command crash silently

Repro: point the "program" in the "server" section of a pwa-chrome launch config to a file that doesn't exist. Chrome will appear and then the debug session will instantly stop, with no error output.

In general I want to think about some more durable lifecycle management than what currently exists.

Track terminal exit codes

(Note mostly for myself) Right now the terminal launching logic is copied largely from the previous adapters, which don't know the exit code of the launched process. This prevents automatic reboots from happening if the process crashes, and requires us to poll for process liveness. It looks like there's an API where we might be able to get these codes by tracking the terminal instance (ref).

Support ability to jump to symbol definition from Variables and Watches views

  • VS Code Version: 1.32.1

Steps to reproduce:

  1. Debug and go to Variables or Watch window.
  2. The values and types for various objects are show.
  3. Hookup the type of the value to the Go to Symbol in Workspace (CTRL+T) of VS Code to be able to jump to the declaration.

image

Eclipse JDT debugger supports this for Java in Variables and Expressions (aka Watch) views - Open Actual Type

Implement logging

We need logging similar to what v1/v2 do, for our own debugging and for users who file issues. Including CDP/DAP traffic and useful internal tracing info.

Housekeeping

Keeping a list so we can do it all later

  • Ban var in source
  • Enforce some tslint rules like requiring { } (?)
  • 4 space tab width (?)
  • Stricter TS rules, like no implicit any
  • Set up CI
  • Component Governance
  • Enforce single quotes
  • Interfaces to start with I (match vscode convention)

First CDP message from Node is missing on the logs

The first CDP message from Node doesn't appear on the log because the message is received before setLogConfig(prefix: string, path?: string) is called for the connection, so this._logPath is undefined, and the message is not logged at: async _onMessage(message: string).

This seems to happen because on: async _startSession(socket: net.Socket) { we create the connection const connection = new Connection(new PipeTransport(socket, rawTelemetryReporter), rawTelemetryReporter);
then we declare/await the handler const { targetInfo } = await new Promise<Cdp.Target.TargetCreatedEvent>(f => cdp.Target.on('targetCreated', f));
and after that we call new NodeTarget(this, connection, cdp, targetInfo); which inside has the logic to call setLogConfig

Ignore #.* when matching page urls

  1. Try to set config for index.html and attach to chrome
  2. Suppose something in the page changes url to index.html#blah

You can no longer re-attach when url hashes change. I think url matching is too strict.

Pretty printing is flakey

I haven't spent a lot of time looking into it yet, but there are a few bugs and usability changes available around pretty printing.

Master work tracking issue

Our first priority is to be able to publish this extension in a form where anyone can install it and use it with their existing node/chrome configs in the same way they are used to, and also try out the new features. In order to publish it to the vscode marketplace, we don't need 100% of the existing features implemented, but it needs to be basically usable, have basic telemetry, and logging for users who report issues.

  • Implement basic node/chrome launch configs
  • Implement all launch config flags
    • #26
    • We can start putting it in front of people with many of these boxes unchecked - not sure where we will draw the line exactly
  • Implement telemetry
    • Started in #54
    • Include GDPR annotations and publish
  • Implement logging
  • Stabilize/fill out tests
    • The existing tests are very unstable: #28
    • The imported Chrome integration tests are mostly failing: #44
    • Need to consider bringing over integration tests from node2 as well
  • Decide what to call it and how to communicate the change to users

  • CELA Product scan?
  • Security review?

Test gaps reported by the VS team, will want to eventually fill these as well: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/2049/JavaScript-debug-adapters-V2?anchor=preliminary-list-of-things-to-test-on-an-integration-level

Feature gaps: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/3608/Comparing-V1-2-to-PWA

Prompt for arguments?

I'm working on a large Node project that's made up of several different packages, each one with a suite of tests. I have a launch.json configuration per package to run each test suite individually. But when I'm trying to debug a single failing test, the overhead of running the entire suite can really slow things down.

In those cases, I go in and manually edit the launch.json and add some arguments to the args field to tell Mocha to only run matching tests with the -g option:

"args": ["--opts", "tests/mocha.opts", "-g", "photos should upload and return a 200 response"],

However, this isn't super discoverable for other people on the team. Ideally, I'd like to make a configuration that prompts the user to provide a string that can be passed as the argument.

I really like how ${command.PickProcess} allows me to create a dynamic configuration with a GUI to prompt me for the process to attach to. Is there any way to do something similar for an argument value? If not, can I humbly submit this as a feature request? 😄

Cannot set breakponint in remote development env (create app using create-react-app)

Steps to reproduce:

  1. cd to an empty folder
  2. yarn create react-app . to create a fresh react app
  3. test code:
import './App.css';
import React, { useState } from 'react';

function App() {
  const [date, setDate] = useState(new Date().toString());

  return (
    <div className="App">
      <p>{date}</p>
      <button onClick={() => setDate(new Date().toString())}>now</button>
    </div>
  );
}

export default App;
  1. Set some breakpoints
    image
  2. ok now create launch.json, all using default config
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://<remote_host_ip>:3030",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

I modified the url field to make sure Chrome in local can navigate to target devserver.
6. yarn start to start devserver
7. launch debugger
8. App running perfectly image
but all breakpoints were ignored and debugger show me "breakpoint set but not yet bound"
image
image

Output of .scripts command in debugger

› VM21 (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/VM21)
› VM22 (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/VM22)
› VM24 (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/VM24)
› http://192.168.33.110:3000/main.069bf2beeaca19cabfce.hot-update.js (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/main.069bf2beeaca19cabfce.hot-update.js)
    - /mnt/work/Project/test/reacttest2/src/App.css (/mnt/work/Project/test/reacttest2/src/App.css)
    - webpack:///./src/App.css?498e (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/src/App.css)
    - /mnt/work/Project/test/reacttest2/src/App.js (/mnt/work/Project/test/reacttest2/src/App.js)
    - /mnt/work/Project/test/reacttest2/src/index.js (/mnt/work/Project/test/reacttest2/src/index.js)
› http://192.168.33.110:3000/static/js/1.chunk.js (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/static/js/1.chunk.js)
    - /mnt/work/Project/test/reacttest2/node_modules/ansi-styles/index.js (/mnt/work/Project/test/reacttest2/node_modules/ansi-styles/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/arrayWithHoles.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/arrayWithHoles.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/nonIterableRest.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/nonIterableRest.js)
    - /mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/slicedToArray.js (/mnt/work/Project/test/reacttest2/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/slicedToArray.js)
    - /mnt/work/Project/test/reacttest2/node_modules/chalk/index.js (/mnt/work/Project/test/reacttest2/node_modules/chalk/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/chalk/node_modules/supports-color/browser.js (/mnt/work/Project/test/reacttest2/node_modules/chalk/node_modules/supports-color/browser.js)
    - /mnt/work/Project/test/reacttest2/node_modules/chalk/templates.js (/mnt/work/Project/test/reacttest2/node_modules/chalk/templates.js)
    - /mnt/work/Project/test/reacttest2/node_modules/color-convert/conversions.js (/mnt/work/Project/test/reacttest2/node_modules/color-convert/conversions.js)
    - /mnt/work/Project/test/reacttest2/node_modules/color-convert/index.js (/mnt/work/Project/test/reacttest2/node_modules/color-convert/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/color-convert/route.js (/mnt/work/Project/test/reacttest2/node_modules/color-convert/route.js)
    - /mnt/work/Project/test/reacttest2/node_modules/color-name/index.js (/mnt/work/Project/test/reacttest2/node_modules/color-name/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/css-loader/dist/runtime/api.js (/mnt/work/Project/test/reacttest2/node_modules/css-loader/dist/runtime/api.js)
    - /mnt/work/Project/test/reacttest2/node_modules/escape-string-regexp/index.js (/mnt/work/Project/test/reacttest2/node_modules/escape-string-regexp/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/inherits/inherits_browser.js (/mnt/work/Project/test/reacttest2/node_modules/inherits/inherits_browser.js)
    - /mnt/work/Project/test/reacttest2/node_modules/json3/lib/json3.js (/mnt/work/Project/test/reacttest2/node_modules/json3/lib/json3.js)
    - /mnt/work/Project/test/reacttest2/node_modules/ms/index.js (/mnt/work/Project/test/reacttest2/node_modules/ms/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/node-libs-browser/node_modules/punycode/punycode.js (/mnt/work/Project/test/reacttest2/node_modules/node-libs-browser/node_modules/punycode/punycode.js)
    - /mnt/work/Project/test/reacttest2/node_modules/object-assign/index.js (/mnt/work/Project/test/reacttest2/node_modules/object-assign/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/process/browser.js (/mnt/work/Project/test/reacttest2/node_modules/process/browser.js)
    - /mnt/work/Project/test/reacttest2/node_modules/prop-types/checkPropTypes.js (/mnt/work/Project/test/reacttest2/node_modules/prop-types/checkPropTypes.js)
    - /mnt/work/Project/test/reacttest2/node_modules/prop-types/lib/ReactPropTypesSecret.js (/mnt/work/Project/test/reacttest2/node_modules/prop-types/lib/ReactPropTypesSecret.js)
    - /mnt/work/Project/test/reacttest2/node_modules/querystring-es3/decode.js (/mnt/work/Project/test/reacttest2/node_modules/querystring-es3/decode.js)
    - /mnt/work/Project/test/reacttest2/node_modules/querystring-es3/encode.js (/mnt/work/Project/test/reacttest2/node_modules/querystring-es3/encode.js)
    - /mnt/work/Project/test/reacttest2/node_modules/querystring-es3/index.js (/mnt/work/Project/test/reacttest2/node_modules/querystring-es3/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/querystringify/index.js (/mnt/work/Project/test/reacttest2/node_modules/querystringify/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/formatWebpackMessages.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/formatWebpackMessages.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/launchEditorEndpoint.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/launchEditorEndpoint.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/debug/src/browser.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/debug/src/browser.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/debug/src/common.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/debug/src/common.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/entry.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/entry.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/close.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/close.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/emitter.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/emitter.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/event.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/event.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/eventtarget.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/eventtarget.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/trans-message.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/event/trans-message.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/facade.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/facade.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/iframe-bootstrap.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/iframe-bootstrap.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-ajax.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-ajax.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-iframe-receiver.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-iframe-receiver.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-iframe.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-iframe.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-receiver.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/info-receiver.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/location.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/location.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/main.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/main.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/shims.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/shims.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport-list.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport-list.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/browser/eventsource.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/browser/eventsource.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/browser/websocket.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/browser/websocket.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/eventsource.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/eventsource.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/htmlfile.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/htmlfile.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/iframe.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/iframe.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/jsonp-polling.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/jsonp-polling.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/ajax-based.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/ajax-based.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/buffered-sender.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/buffered-sender.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/polling.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/polling.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/sender-receiver.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/lib/sender-receiver.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/eventsource.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/eventsource.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/htmlfile.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/htmlfile.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/jsonp.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/jsonp.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/xhr.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/receiver/xhr.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/jsonp.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/jsonp.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xdr.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xdr.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xhr-fake.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xhr-fake.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xhr-local.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/sender/xhr-local.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/websocket.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/websocket.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xdr-polling.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xdr-polling.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xdr-streaming.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xdr-streaming.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xhr-polling.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xhr-polling.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xhr-streaming.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/transport/xhr-streaming.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/browser-crypto.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/browser-crypto.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/browser.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/browser.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/escape.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/escape.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/event.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/event.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/iframe.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/iframe.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/log.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/log.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/object.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/object.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/random.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/random.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/transport.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/transport.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/url.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/utils/url.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/version.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/node_modules/sockjs-client/lib/version.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/webpackHotDevClient.js (/mnt/work/Project/test/reacttest2/node_modules/react-dev-utils/webpackHotDevClient.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dom/cjs/react-dom.development.js (/mnt/work/Project/test/reacttest2/node_modules/react-dom/cjs/react-dom.development.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-dom/index.js (/mnt/work/Project/test/reacttest2/node_modules/react-dom/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react-error-overlay/lib/index.js (/mnt/work/Project/test/reacttest2/node_modules/react-error-overlay/lib/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react/cjs/react.development.js (/mnt/work/Project/test/reacttest2/node_modules/react/cjs/react.development.js)
    - /mnt/work/Project/test/reacttest2/node_modules/react/index.js (/mnt/work/Project/test/reacttest2/node_modules/react/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/requires-port/index.js (/mnt/work/Project/test/reacttest2/node_modules/requires-port/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/scheduler/cjs/scheduler-tracing.development.js (/mnt/work/Project/test/reacttest2/node_modules/scheduler/cjs/scheduler-tracing.development.js)
    - /mnt/work/Project/test/reacttest2/node_modules/scheduler/cjs/scheduler.development.js (/mnt/work/Project/test/reacttest2/node_modules/scheduler/cjs/scheduler.development.js)
    - /mnt/work/Project/test/reacttest2/node_modules/scheduler/index.js (/mnt/work/Project/test/reacttest2/node_modules/scheduler/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/scheduler/tracing.js (/mnt/work/Project/test/reacttest2/node_modules/scheduler/tracing.js)
    - /mnt/work/Project/test/reacttest2/node_modules/strip-ansi/index.js (/mnt/work/Project/test/reacttest2/node_modules/strip-ansi/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/strip-ansi/node_modules/ansi-regex/index.js (/mnt/work/Project/test/reacttest2/node_modules/strip-ansi/node_modules/ansi-regex/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js (/mnt/work/Project/test/reacttest2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js)
    - /mnt/work/Project/test/reacttest2/node_modules/url-parse/index.js (/mnt/work/Project/test/reacttest2/node_modules/url-parse/index.js)
    - /mnt/work/Project/test/reacttest2/node_modules/url/url.js (/mnt/work/Project/test/reacttest2/node_modules/url/url.js)
    - /mnt/work/Project/test/reacttest2/node_modules/url/util.js (/mnt/work/Project/test/reacttest2/node_modules/url/util.js)
    - /mnt/work/Project/test/reacttest2/node_modules/webpack/buildin/amd-options.js (/mnt/work/Project/test/reacttest2/node_modules/webpack/buildin/amd-options.js)
    - /mnt/work/Project/test/reacttest2/node_modules/webpack/buildin/global.js (/mnt/work/Project/test/reacttest2/node_modules/webpack/buildin/global.js)
    - /mnt/work/Project/test/reacttest2/node_modules/webpack/buildin/module.js (/mnt/work/Project/test/reacttest2/node_modules/webpack/buildin/module.js)
› http://192.168.33.110:3000/static/js/bundle.js (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/static/js/bundle.js)
    - /mnt/work/Project/test/reacttest2/webpack/bootstrap (/mnt/work/Project/test/reacttest2/webpack/bootstrap)
› http://192.168.33.110:3000/static/js/main.chunk.js (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/static/js/main.chunk.js)
    - /mnt/work/Project/test/reacttest2/src/App.css (/mnt/work/Project/test/reacttest2/src/App.css)
    - /mnt/work/Project/test/reacttest2/src/index.css (/mnt/work/Project/test/reacttest2/src/index.css)
    - webpack:///./src/App.css?498e (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/src/App.css)
    - /mnt/work/Project/test/reacttest2/src/App.js (/mnt/work/Project/test/reacttest2/src/App.js)
    - webpack:///./src/index.css?e32c (/__vscode-remote-uri__/mnt/work/Project/test/reacttest2/src/index.css)
    - /mnt/work/Project/test/reacttest2/src/index.js (/mnt/work/Project/test/reacttest2/src/index.js)
    - /mnt/work/Project/test/reacttest2/src/serviceWorker.js (/mnt/work/Project/test/reacttest2/src/serviceWorker.js)

Workspace Path: /mnt/work/Project/test/reacttest2

Remaining skipFiles work

To track work remaining for skipFiles. Started with #48

#48 (comment)

  • Passing unit tests
  • Passing integration tests
  • Error handling (don't show user stacktrace when error occurs)
  • Browser launch support
  • Browser attach support
  • Dynamic toggling of skipFiles during debug session

How do I use it for Electron

I used to use pwa debugger for my Electron app with the following config:

{
      "type": "pwa",
      "request": "launch",
      "name": "Electron App",
      "command": "npm run electron -- --remote-debugging-port=9222",
      "remoteDebuggingPort": "9222"
    },

Is this supported? How do I configure it?

Respect DAP flag for line and column positions

Right now we assume throughout the code that positions we get over and send to DAP are 1-indexed, but this is technically configurable in the protocol. We should respect the settings we receive from the initialize command.

Enhancement: make debugger respect user-defined extension settings

Currently extension doesn't respect user-defined non-standard extension settings neither from files.associations nor \VSCode\resources\app\extensions\javascript\package.json. Would be nice if it did.
Goal: to have an ability to launch JS files with non-standard extension, f.ex. *.njs or whatever (to distinguish Node sources from browser JS and shell JS).

Validate breakpoint resolution in sourcemapped scripts

Previous versions of the debug adapter had breakOnLoad options that we used to ensure scripts and breakpoints were set before evaluating the script. PWA works a little more intelligently by using the beforeScriptWithSourceMapExecution instrumentation breakpoint and resolving and user-defined breakpoints at that time. This seems to work well in my testing, but we should monitor and ensure that there aren't edge cases it ends up missing.

bc19ac0

Revisit bootloader require on Windows

I moved it to the command line to get my base test working on my VM, but it needs to be in an env var. More work is needed to deal with spaces in paths on Windows.

Support debugging on a Node.js WebSocket source

Hello, I'd like to ask for a feature. That is to support remote debugging on a Node.js target, which has only a WebSocket link. Currently I have to use chrome devtool to do this, by using this link:

chrome-devtools://devtools/bundled/inspector.html?v8only=true&ws=

But if I fill my WebSocket debug link in the address field in launch.json, it does not work at all.

Thanks!

Allow runtimeExecutable to be set globally

There should be a way to set the runtimeExecutable as a user config for the extension. That way you could set it up once instead of doing it for every new project, in case you don't have Chrome installed to one of the default paths.

Launch Config Parity

New Options

The following new options are tracked for support:

  • logging -- new logging object that improves granularity
  • nodeFilter
  • baseURL -- (reconcile with path mappings?)

Additionally, vscode-pwa supports booting and debugging a server and client in a single launch config. It would make sense to preserve that behavior. Therefore, the chrome launch action config can have an additional property server that contains the Node launch config.

{
  "type": "pwa-chrome",
  "request": "launch",
  "name": "Web page 2",
  "url": "http://localhost:5002",
  "server": {
    "program": "${workspaceFolder}/main.js"
  }
}

Existing Options

We want to make vscode-pwa match and reach parity with the existing launch config options. This tracks that works.

node: launch

  • address
  • args
  • autoAttachChildProcesses
  • console
  • cwd
  • disableOptimisticBPs
  • env
  • envFile
  • externalConsole
  • localRoot
  • outDir -- previously deprecated, now removed
  • outFiles -- merge with resolveSourceMapLocations (?)
  • outputCapture
  • port
  • program
  • remoteRoot
  • restart
  • runtimeArgs
  • runtimeExecutable
  • runtimeVersion
  • showAsyncStacks
  • skipFiles -- depends on https://dev.azure.com/devdiv/DevDiv/_workitems/edit/431549 @Shenniey
  • smartStep @roblourens
  • sourceMapPathOverrides
  • sourceMaps
  • stopOnEntry
  • timeout
  • trace -- #34
  • useWSL

node: attach

chrome: launch

chrome: attach

Clear Debug Console on refresh

I would like the Debug Console to be cleared at each refresh, similar to how Google Chrome clears the console by default when you refresh. Is there a way to do this?

Set up CI

Can add this to our OSS Azure devops org

Integration test status

The current status of failing Chrome integration tests ported from the old codebase

Had to run some of these individually to get a clean run, since Chrome doesn't always shut down.

  • "Attach without specifying a url"
    • Attach request
  • 2 adapter.test.ts case sensitivity tests
    • Need to patch dc.launchRequest same as dc.launch
  • "should stop on debugger statement"
    • "debugger" pause reason
  • "Unknown request should produce error"
    • Timeout, looks for certain error response
  • "Hit breakpoint on JavaScript when source map is invalid"
    • Crashes adapter, exception thrown from source-map
  • 2 "Should launch successfully on port 0" tests
    • Not hooked up properly (?)
  • "Unusual source-maps"
    • Column off by 1
  • "Should stop on a breakpoint in an in-line script"
    • Stack frame format (?)
  • "No unhandled exceptions when we parse invalid JavaScript code"
    • Looks for certain error output
  • 3 "loaded sources" tests
    • "debugger" pause reason
    • And late "continue" events (DA sends "continue" after disconnect which Pinezorro will not like)
  • 4 "stack traces" tests
    • Some difference in formatting
  • Some others previously disabled as failing
  • Many hit condition breakpoints
    • Not implemented
  • Break on load related tests
    • Needs investigation
  • React framework tests
    • Needs investigation

Also only Chrome tests have been ported. There are a smaller number of node tests that I need to port as well.

Add ability for for chrome to wait for server

Right now if you launch chrome and specify a command (soon, a nested server), the browser can launch before the Node server is up and running and display an error page. Add the ability to poll and wait for the server to boot before launching the browser.

How do I use it for the full stack apps?

I used to be able to debug my full stack app via the following configuration.

{
      "type": "pwa",
      "request": "launch",
      "name": "Client / Server",
      "command": "npm run server",
      "url": "http://localhost:8080/build/web/index.html",
},

It is not clear whether this is supported and how user is supposed to configure it.

webpack library configuration does not resolve source map sources

Here is a sample webpack configuration file

module.exports = {
  target: 'node',
  devtool: 'source-map',
  entry: './src/lib.ts',
  module: {
    rules: [
      {
        loader: 'ts-loader',
        exclude: /node_modules/
      }
    ]
  },
  node: {
    __dirname: false,
  },
  resolve: {
    extensions: [ '.ts', '.js' ]
  },
  externals: [nodeExternals()],
  output: {
    filename: 'lib.js',
    path: path.resolve(__dirname, 'build'),
    library: 'lib',
    libraryTarget:'umd'
  }
};

This produces source map source urls which look like webpack://lib/./src/lib.ts and should be mapped to src/lib.ts.

Here is a sample fix against an outdated branch.

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.