{"id":20139244,"url":"https://github.com/lpreterite/vscode-babel-debug-example","last_synced_at":"2025-11-27T19:04:34.730Z","repository":{"id":81486142,"uuid":"114198037","full_name":"lpreterite/vscode-babel-debug-example","owner":"lpreterite","description":"vscode babel debug example","archived":false,"fork":false,"pushed_at":"2018-04-23T08:28:10.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T10:11:28.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/lpreterite.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}},"created_at":"2017-12-14T03:30:01.000Z","updated_at":"2018-04-23T08:28:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c19fe42-4c44-479e-a0c1-e479ad3a023e","html_url":"https://github.com/lpreterite/vscode-babel-debug-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpreterite%2Fvscode-babel-debug-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpreterite%2Fvscode-babel-debug-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpreterite%2Fvscode-babel-debug-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpreterite%2Fvscode-babel-debug-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpreterite","download_url":"https://codeload.github.com/lpreterite/vscode-babel-debug-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582557,"owners_count":19985846,"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","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":[],"created_at":"2024-11-13T21:44:32.458Z","updated_at":"2025-11-27T19:04:34.663Z","avatar_url":"https://github.com/lpreterite.png","language":"JavaScript","readme":"# vscode-babel-debug-example\n\nvscode babel debug example\n\nif you would to use breakpoint by vue in VSCode, can see [lpreterite/vue-test-utils-mocha-webpack-example](https://github.com/lpreterite/vue-test-utils-mocha-webpack-example)\n\n## debugging with babel\n\nThe idea is to first use babel to generate the file and source-map, and then run the program. The following is the vscode setting steps\n\n1. Add Task\n    ```json\n    // # .vscode/tasks.json\n    {\n        \"version\": \"2.0.0\",\n        \"tasks\": [\n            {\n                \"label\": \"build\",\n                \"type\": \"shell\",\n                \"command\": \"babel\",\n                \"args\": [\n                    \"src\",\n                    \"-d\",\n                    \"lib/src\",\n                    \"-s\"\n                ]\n            }\n        ]\n    }\n    ```\n2. Add Launch\n    ```json\n    // # .vscode/launch.json\n    {\n        \"version\": \"0.2.0\",\n        \"configurations\": [\n            {\n                \"type\": \"node\",\n                \"request\": \"launch\",\n                \"name\": \"Launch Babel\",\n                \"program\": \"${workspaceRoot}/lib/src/index.js\",\n                \"cwd\": \"${workspaceRoot}\",\n                \"preLaunchTask\": \"build\",\n                \"outFiles\": [\n                    \"${workspaceRoot}/lib/src/**.js\"\n                ]\n            }\n        ]\n    }\n    ```\n3. Run Launch\n    \n    Pressing Ctrl+Shift+B or running Run Build Task... \n\n## Some Questions\n\n- Q. How to make the terminal does not show by default ?\n- A. You can set `reveal` to **\"never\"**\n    ```json\n    // # .vscode/launch.json\n    {\n        \"version\": \"2.0.0\",\n        \"tasks\": [\n            {\n                \"label\": \"build\",\n                \"type\": \"shell\",\n                \"command\": \"babel\",\n                \"args\": [\n                    \"src\",\n                    \"-d\",\n                    \"lib/src\",\n                    \"-s\"\n                ],\n                \"presentation\": {\n                    \"echo\": true,\n                    \"reveal\": \"never\",\n                    \"focus\": false,\n                    \"panel\": \"shared\"\n                }\n            }\n        ]\n    }\n    ```\n\n## more see\n\nhttps://code.visualstudio.com/docs/editor/debugging\n\nhttps://code.visualstudio.com/docs/editor/tasks\n\nhttp://babeljs.io/docs/usage/cli/\n\nhttps://stackoverflow.com/questions/38557822/debugging-in-visual-studio-code-with-babel-node\n\nhttps://github.com/zinserjan/mocha-webpack/issues/67","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpreterite%2Fvscode-babel-debug-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpreterite%2Fvscode-babel-debug-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpreterite%2Fvscode-babel-debug-example/lists"}