Skip to content

Commit 9af1b83

Browse files
prigarathongdong7
authored andcommitted
Docs: debugging in WebStorm (facebook#2986)
* Debugging in WebStorm * Fixed formatting for shortcuts * Added note about default URL
1 parent b4d3969 commit 9af1b83

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

packages/react-scripts/template/README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,11 @@ If you want to enforce a coding style for your project, consider using [Prettier
243243

244244
## Debugging in the Editor
245245

246-
**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) editor.**
246+
**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).**
247247

248-
Visual Studio Code supports debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools.
248+
Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools.
249+
250+
### Visual Studio Code
249251

250252
You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed.
251253

@@ -267,9 +269,22 @@ Then add the block below to your `launch.json` file and put it inside the `.vsco
267269
}]
268270
}
269271
```
272+
>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration).
270273
271274
Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
272275

276+
### WebStorm
277+
278+
You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed.
279+
280+
In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration.
281+
282+
>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration).
283+
284+
Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm.
285+
286+
The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine.
287+
273288
## Formatting Code Automatically
274289

275290
Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy