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

Example VSCode Launch Script Configuration #58

Open
arnavb opened this issue Jul 4, 2019 · 0 comments
Open

Example VSCode Launch Script Configuration #58

arnavb opened this issue Jul 4, 2019 · 0 comments

Comments

@arnavb
Copy link

arnavb commented Jul 4, 2019

So I wanted to see if I could get full stack debugging in VSCode working with this project and I think I've made a working launch script:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Server",
      "program": "${workspaceFolder}/server.js",
      "cwd": "${workspaceFolder}"
    },
    {
        "name": "Client",
        "type": "chrome",
        "request": "launch",
        "url": "http://localhost:3000",
        "webRoot": "${workspaceFolder}/client",
        "sourceMapPathOverrides": {
          "webpack:///src/*": "${webRoot}/src/*"
        }
      }
  ],
  "compounds": [
    {
      "name": "Server/Client",
      "configurations": ["Server", "Client"]
    }
  ]
}

Now when I run the server/client debugging combination (after running npm start in the client folder), with this config I am able to put breakpoints in client API calls and their corresponding express API routes; both of these breakpoints are successfully hit.

I was wondering if you would consider including this launch script in your project (perhaps in the README?). At least in my case, it makes the debugging experience a lot easier for VSCode, which I assume is quite commonly used.

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

No branches or pull requests

1 participant