Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something cool to add to the readme #4

Open
andreialecu opened this issue Feb 27, 2019 · 1 comment
Open

Something cool to add to the readme #4

andreialecu opened this issue Feb 27, 2019 · 1 comment
Assignees
Labels
documentation Something to add/change

Comments

@andreialecu
Copy link

I set your plugin up for debugging typescript via ts-node and had issues getting sourcemaps to work properly because of the mismatch between linux style paths and windows style paths.

This problem is described here:
https://github.com/Microsoft/vscode-chrome-debug/issues/524

I had the idea to try using this:

  "sourceMapPathOverrides": {
    "${command:extension.vscode-wsl-workspaceFolder}/*": "${workspaceFolder}/*"
  },

My full launch.json:

{
  // 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": "node",
      "request": "launch",
      "name": "yarn start:debug",
      "localRoot": "${workspaceFolder}",
      "remoteRoot": "${command:extension.vscode-wsl-workspaceFolder}",
      "useWSL": true,
      "internalConsoleOptions": "openOnSessionStart",
      "runtimeExecutable": "yarn",
      "runtimeArgs": [
          "run", "start:debug"
      ],
      "sourceMapPathOverrides": {
        "${command:extension.vscode-wsl-workspaceFolder}/*": "${workspaceFolder}/*"
      },
      "port": 9229,
      "protocol": "inspector"
    }
  ]
}

package.json:

"scripts": {
  "start:debug": "node --nolazy --inspect-brk -r tsconfig-paths/register -r ts-node/register src/main.ts"
}

And.. it works! Might be something you want to add to the README. 🚀

@lfurzewaddock lfurzewaddock added the documentation Something to add/change label Mar 7, 2019
@lfurzewaddock
Copy link
Owner

Thanks @andreialecu for sharing your use case.

Are you willing to submit a pull request with your snippets for the README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Something to add/change
Projects
None yet
Development

No branches or pull requests

2 participants