{"id":28268565,"url":"https://github.com/tangdaohai/es6-babel-node-debug","last_synced_at":"2025-07-31T14:42:25.678Z","repository":{"id":137233724,"uuid":"82283778","full_name":"tangdaohai/es6-babel-node-debug","owner":"tangdaohai","description":"如何在 webStorm 中使用 babel-node 调试 ES6代码","archived":false,"fork":false,"pushed_at":"2017-02-21T07:45:15.000Z","size":764,"stargazers_count":9,"open_issues_count":5,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-21T13:42:59.080Z","etag":null,"topics":["babel-debug","node-debug","webstorm"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangdaohai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-17T10:03:27.000Z","updated_at":"2021-04-01T17:08:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"522e9256-ec11-4883-b3ab-44995311d9a8","html_url":"https://github.com/tangdaohai/es6-babel-node-debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tangdaohai/es6-babel-node-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangdaohai%2Fes6-babel-node-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangdaohai%2Fes6-babel-node-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangdaohai%2Fes6-babel-node-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangdaohai%2Fes6-babel-node-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangdaohai","download_url":"https://codeload.github.com/tangdaohai/es6-babel-node-debug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangdaohai%2Fes6-babel-node-debug/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268057775,"owners_count":24188623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel-debug","node-debug","webstorm"],"created_at":"2025-05-20T15:13:01.867Z","updated_at":"2025-07-31T14:42:25.666Z","avatar_url":"https://github.com/tangdaohai.png","language":"JavaScript","readme":"### 如何使用 webStorm 调试 babel-node 启动的服务端源代码\n\n1. 配置启动选项示意图\n\n![setting config](docs/setting.png)\n\n2. 参数说明 \u0026 配置后启动报错相关说明\n\n     * Node interpreter: ./node_modules/babel-cli/bin/babel-node.js\n     \n     这个参数是说使用什么启动程序，默认的是 `node`, 这里我们将它设置为`babel-node`,\n     可以是项目中`局部`的 babel 也可以是`全局`的babel-node,可以使用 `which babel-node`\n     查看 babel-node 全局路径。\n\n     注意如果是 `windows` 出现`CreateProcess failed with error 193 (no message available)`\n     应该将其设置为 `./node_modules/bin/babel-node.cmd`,注意`npm \u003e= 3`版本。\n     \n     * Node parameters: --expose_debug_as=v8debug -- //不要忽略后面的两个 --\n     \n     这个是对于node 的启动参数.\n     \n     如果出现 `v8debug is not defined` 请不要忽略 `--expose_debug_as=v8debug`。\n     \n     如果出现 `code.trim is not a function` 请不要忽略后面的 `--`\n     \n     * Working directory: 项目的路径\n     \n     * JavaScript file: 入口文件\n     \n     * Application parameters: 这个是项目中的参数, 使用`process.argv`获取。\n     \n     * Environment variables: 环境变量相关, 比如: `NODE_ENV=development`。\n\n     注意这个是`key`, `value`的设置方式, 一一对应。\n\n\u003e 如果变量一栏里面一直出现`collecting data`, 可以将webStorm `升级到最新`, 或者使用 `node 4.x` 版本\n\n\n3. 启动与调试\n\n![start debug](docs/start-debug.png)\n\n点击那个虫子…… 启动 debug 模式。\n\n在`源码`打上断点，访问一下服务, 断点停住了, 可以进行调试了\n\n![debug](docs/debug.png)\n\n下面的工具栏控制断点进度,不熟悉的可以搜下`webStorm 的调试方式`。\n![debug](docs/debug1.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangdaohai%2Fes6-babel-node-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangdaohai%2Fes6-babel-node-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangdaohai%2Fes6-babel-node-debug/lists"}