{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/5319","repository_url":"https://api.github.com/repos/facebook/create-react-app","labels_url":"https://api.github.com/repos/facebook/create-react-app/issues/5319/labels{/name}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/5319/comments","events_url":"https://api.github.com/repos/facebook/create-react-app/issues/5319/events","html_url":"https://github.com/facebook/create-react-app/issues/5319","id":367310715,"node_id":"MDU6SXNzdWUzNjczMTA3MTU=","number":5319,"title":"CRA2 recommended config hits random break points in VS Code ","user":{"login":"ryanwmarsh","id":824046,"node_id":"MDQ6VXNlcjgyNDA0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/824046?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanwmarsh","html_url":"https://github.com/ryanwmarsh","followers_url":"https://api.github.com/users/ryanwmarsh/followers","following_url":"https://api.github.com/users/ryanwmarsh/following{/other_user}","gists_url":"https://api.github.com/users/ryanwmarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanwmarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanwmarsh/subscriptions","organizations_url":"https://api.github.com/users/ryanwmarsh/orgs","repos_url":"https://api.github.com/users/ryanwmarsh/repos","events_url":"https://api.github.com/users/ryanwmarsh/events{/privacy}","received_events_url":"https://api.github.com/users/ryanwmarsh/received_events","type":"User","site_admin":false},"labels":[{"id":492695674,"node_id":"MDU6TGFiZWw0OTI2OTU2NzQ=","url":"https://api.github.com/repos/facebook/create-react-app/labels/tag:%20documentation","name":"tag: documentation","color":"006b75","default":false},{"id":809349309,"node_id":"MDU6TGFiZWw4MDkzNDkzMDk=","url":"https://api.github.com/repos/facebook/create-react-app/labels/tag:%20needs%20investigation","name":"tag: needs investigation","color":"d106e8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2018-10-05T17:58:21Z","updated_at":"2018-11-30T18:31:08Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n  PLEASE READ THE FIRST SECTION :-)\r\n-->\r\n\r\n### Is this a bug report?\r\n\r\nYes\r\n\r\n### Did you try recovering your dependencies?\r\n\r\n<!--\r\n  Your module tree might be corrupted, and that might be causing the issues.\r\n  Let's try to recover it. First, delete these files and folders in your project:\r\n\r\n    * node_modules\r\n    * package-lock.json\r\n    * yarn.lock\r\n\r\n  Then you need to decide which package manager you prefer to use.\r\n  We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).\r\n  However, **they can't be used together in one project** so you need to pick one.\r\n  \r\n  If you decided to use npm, run this in your project directory:\r\n\r\n    npm install -g npm@latest\r\n    npm install\r\n\r\n  This should fix your project.\r\n  \r\n  If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install).\r\n  Then run in your project directory:\r\n\r\n    yarn\r\n\r\n  This should fix your project.\r\n\r\n  Importantly, **if you decided to use yarn, you should never run `npm install` in the project**.\r\n  For example, yarn users should run `yarn add <library>` instead of `npm install <library>`.\r\n  Otherwise your project will break again.\r\n\r\n  Have you done all these steps and still see the issue?\r\n  Please paste the output of `npm --version` and/or `yarn --version` to confirm.\r\n-->\r\nYes\r\n\r\n`npm --version`\r\n6.4.1\r\n`yarn --version`\r\n1.10.1\r\n\r\n### Which terms did you search for in User Guide?\r\n\r\n<!--\r\n  There are a few common documented problems, such as watcher not detecting changes, or build failing.\r\n  They are described in the Troubleshooting section of the User Guide:\r\n\r\n  https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting\r\n\r\n  Please scan these few sections for common problems.\r\n  Additionally, you can search the User Guide itself for something you're having issues with:\r\n  \r\n  https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md\r\n  \r\n  If you didn't find the solution, please share which words you searched for.\r\n  This helps us improve documentation for future readers who might encounter the same problem.\r\n-->\r\n\r\n\"vs code\" debugger breakpoints\r\n\r\n\r\n### Environment\r\n\r\n<!--\r\n  To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.\r\n  This enables the maintainers quickly reproduce the issue and give feedback.\r\n\r\n  Run the following command in your React app's folder in terminal.\r\n  Note: The result is copied to your clipboard directly.\r\n\r\n  `npx create-react-app --info`\r\n\r\n  Paste the output of the command in the section below.\r\n-->\r\n\r\n```\r\n  System:\r\n    OS: macOS 10.14\r\n    CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz\r\n  Binaries:\r\n    Node: 10.10.0 - ~/.nvm/versions/node/v10.10.0/bin/node\r\n    Yarn: 1.10.1 - ~/.nvm/versions/node/v10.10.0/bin/yarn\r\n    npm: 6.4.1 - ~/.nvm/versions/node/v10.10.0/bin/npm\r\n  Browsers:\r\n    Chrome: 69.0.3497.100\r\n    Safari: 12.0\r\n  npmPackages:\r\n    react: ^16.5.2 => 16.5.2 \r\n    react-dom: ^16.5.2 => 16.5.2 \r\n    react-scripts: 2.0.4 => 2.0.4 \r\n  npmGlobalPackages:\r\n    create-react-app: 2.0.2\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\n<!--\r\n  How would you describe your issue to someone who doesn’t know you or your project?\r\n  Try to write a sequence of steps that anybody can repeat to see the issue.\r\n-->\r\n\r\n1. Install VS Code 1.27.2 or 1.26.1\r\n2. `npx create-react-app debug-cra2` \r\n3. Add [recommended Debug CRA Tests snippet](https://github.com/facebook/create-react-app/blob/ea15ebad8ff3ce3cf5c4ebda3135cfe91b98ac61/packages/react-scripts/template/README.md#debugging-tests-in-visual-studio-code) to `.vscode/launch.json`\r\n4. Add the snippet below to `src/App.test.js`\r\n5. Set breakpoint on line 13 `console.log({ foo })`\r\n6. Hit `F5` and debug\r\n\r\nSnippet for App.test.js \r\n```javascript\r\nit('should find the breakpoint', () => {\r\n  const foo = 'bar'\r\n  console.log({ foo })\r\n  expect(foo).toBe('bar')\r\n})\r\n\r\nit('should find the other breakpoint', () => {\r\n  const foo = 'bar'\r\n  console.log({ foo })\r\n  expect(foo).toBe('bar')\r\n})\r\n```\r\n\r\n### Expected Behavior\r\n\r\n<!--\r\n  How did you expect the tool to behave?\r\n  It’s fine if you’re not sure your understanding is correct.\r\n  Just write down what you thought would happen.\r\n-->\r\n\r\nExecution stops on line 13\r\n\r\n\r\n### Actual Behavior\r\n\r\n<!--\r\n  Did something go wrong?\r\n  Is something broken, or not behaving as you expected?\r\n  Please attach screenshots if possible! They are extremely helpful for diagnosing issues.\r\n-->\r\n\r\nExecution stops on line 6 or 7, it's inconsistent. \r\n\r\n\r\n### Reproducible Demo\r\n\r\n<!--\r\n  If you can, please share a project that reproduces the issue.\r\n  This is the single most effective way to get an issue fixed soon.\r\n\r\n  There are two ways to do it:\r\n\r\n    * Create a new app and try to reproduce the issue in it.\r\n      This is useful if you roughly know where the problem is, or can’t share the real code.\r\n\r\n    * Or, copy your app and remove things until you’re left with the minimal reproducible demo.\r\n      This is useful for finding the root cause. You may then optionally create a new project.\r\n\r\n  This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve\r\n  Once you’re done, push the project to GitHub and paste the link to it below:\r\n-->\r\n\r\nhttps://github.com/ryanwmarsh/debug-cra2\r\n\r\n<!--\r\n  What happens if you skip this step?\r\n  \r\n  We will try to help you, but in many cases it is impossible because crucial\r\n  information is missing. In that case we'll tag an issue as having a low priority,\r\n  and eventually close it if there is no clear direction.\r\n  \r\n  We still appreciate the report though, as eventually somebody else might\r\n  create a reproducible example for it.\r\n\r\n  Thanks for helping us help you!\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/comments/443296066","html_url":"https://github.com/facebook/create-react-app/issues/5319#issuecomment-443296066","issue_url":"https://api.github.com/repos/facebook/create-react-app/issues/5319","id":443296066,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzI5NjA2Ng==","user":{"login":"roblourens","id":323878,"node_id":"MDQ6VXNlcjMyMzg3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/323878?v=4","gravatar_id":"","url":"https://api.github.com/users/roblourens","html_url":"https://github.com/roblourens","followers_url":"https://api.github.com/users/roblourens/followers","following_url":"https://api.github.com/users/roblourens/following{/other_user}","gists_url":"https://api.github.com/users/roblourens/gists{/gist_id}","starred_url":"https://api.github.com/users/roblourens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblourens/subscriptions","organizations_url":"https://api.github.com/users/roblourens/orgs","repos_url":"https://api.github.com/users/roblourens/repos","events_url":"https://api.github.com/users/roblourens/events{/privacy}","received_events_url":"https://api.github.com/users/roblourens/received_events","type":"User","site_admin":false},"created_at":"2018-11-30T18:31:08Z","updated_at":"2018-11-30T18:31:08Z","author_association":"NONE","body":"For anyone using the new flag in vscode Insiders, I've removed the underscore and it will be in the next stable release. I recommend using the flag for debugging tests with Jest/CRA: \r\n\r\n`\"disableOptimisticBPs\": true`\r\n\r\nAlso, work is in progress to give Node the ability to pause on script load: https://github.com/nodejs/node/issues/24687\r\n\r\nThis will help vscode with this issue, because it will be able to pause when your test script is loaded, load the sourcemap, set breakpoints correctly, then continue execution."}}
{"actor":{"display_login":"roblourens"}}