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

Task: Add 'How to debug' section to the README file. #1128

Open
egillanton opened this issue Oct 18, 2022 · 4 comments
Open

Task: Add 'How to debug' section to the README file. #1128

egillanton opened this issue Oct 18, 2022 · 4 comments
Labels

Comments

@egillanton
Copy link

Task

Add documentation on how to debug the app locally.

Add for example a .vscode/launch.json file that people can use to run the app instead of running npm run dev.

For now, there is no way for a newcomer to debug their code.

@egillanton
Copy link
Author

In a Shopify CLI 1.X and 2.X generated app I was able to create easily a .vscode/launch.json file that I would use when debugging locally:

.vscode/launch.json

 {
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "program": "${workspaceFolder}\\server\\index.js"
    }
  ]
}

@Michael-Gibbons
Copy link

I agree, putting it in the repo would be too opinionated imo but I like the idea of adding it to the readme! I will look into this.

@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

@github-actions github-actions bot added the Stale label Dec 19, 2022
@yinxiangming
Copy link

I think you can debug from package.json. Open it from VS code exporlor and click the "debug" link after a triangle. It will popup a menu to let you select the commands in package.json. Select the "dev", then it will run the "shopify app dev" command and attach the debugger.

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

No branches or pull requests

3 participants