{"id":21655919,"url":"https://github.com/koltyakov/pnp-js-core-debug","last_synced_at":"2026-04-18T09:36:16.164Z","repository":{"id":73404893,"uuid":"112458305","full_name":"koltyakov/PnP-JS-Core-Debug","owner":"koltyakov","description":"PnP-JS-Core Quick Debug in Node JS - a service project to allow quick interactive testing while contributing to sp-pnp-js","archived":false,"fork":false,"pushed_at":"2018-02-17T12:15:11.000Z","size":324,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T04:46:50.787Z","etag":null,"topics":["debug","development","sharepoint","sp-pnp-js","typescrit"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/koltyakov.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-11-29T10:01:32.000Z","updated_at":"2018-01-30T14:00:41.000Z","dependencies_parsed_at":"2023-07-08T08:15:12.902Z","dependency_job_id":null,"html_url":"https://github.com/koltyakov/PnP-JS-Core-Debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/koltyakov/PnP-JS-Core-Debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koltyakov%2FPnP-JS-Core-Debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koltyakov%2FPnP-JS-Core-Debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koltyakov%2FPnP-JS-Core-Debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koltyakov%2FPnP-JS-Core-Debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koltyakov","download_url":"https://codeload.github.com/koltyakov/PnP-JS-Core-Debug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koltyakov%2FPnP-JS-Core-Debug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31964288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["debug","development","sharepoint","sp-pnp-js","typescrit"],"created_at":"2024-11-25T08:37:46.790Z","updated_at":"2026-04-18T09:36:16.137Z","avatar_url":"https://github.com/koltyakov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PnP JS Core Debug\n\nAllows debugging local sources of PnP JS Core right in TypeScript with live requests to SharePoint environment in Node.js.\n\n## Prerequisites\n\n- Node.js\n- TypeScript\n- TSLint\n- Gulp\n\n### Install Node.js global modules\n\n```bash\nnpm install typescript tslint ts-node gulp -g\n```\n\n## Fork projects\n\n- [PnP JS Core](https://github.com/SharePoint/PnP-JS-Core)\n- [PnP JS Core Debug](https://github.com/koltyakov/PnP-JS-Core-Debug)\n\n## Clone forks\n\nProjects' folders should be located in the same root folder.\n\n```bash\ngit clone https://github.com/[namespace]/PnP-JS-Core\ngit clone https://github.com/[namespace]/PnP-JS-Core-Debug\n```\n\n`[namespace]` stands for you or your company GitHub account.\n\n## Install dependencies\n\nDependencies should be restored in both projects' folders:\n\n```bash\nnpm install\n```\n\nor\n\n```bash\nyarn install\n```\n\n## VS Code is our editor of choise\n\nOpen both projects in VS Code. Workspaces are the best option here.\n\n![](/assets/vscode_workspace.png)\n\n## Upstream for PnP JS Core\n\nAdd upstream for PnP JS Core (one-time operation).\nIn `PnP JS Core`'s folder:\n\n```bash\ngit remote add upstream https://github.com/SharePoint/PnP-JS-Core\n```\n\nThis will allow syncing your repository sources with main repo with:\n\n```bash\ngit pull upstream dev\n```\n\n## Feature branch\n\nIt's recommended using feature branches for code changes related to a specific feature or bug fix.\n\nBefore creating a feature branch make sure:\n\n- A feature branch is based on PnP JS Core `dev` branch.\n- The local branch is synced with remote `upstream` branch (this can be done with feature branch too).\n\n```bash\ngit checkout dev\ngit fetch upstream dev\ngit checkout -b [name_of_your_new_branch]\n```\n\nIt's better to prefix feature branch with `dev-`.\n\n## Connecting tools with SharePoint\n\nOn first run SharePoint environment connection should be initiated:\n\n### Run npm task\n\n```bash\nnpm run init\n```\n\nYou'll be prompted with SharePoint web URL and credentials, just follow the wizard:\n\n![](/assets/auth_init.png)\n\nRead [more](https://github.com/s-KaiNet/node-sp-auth) about supported auth scenarios.\n\n### Configuration files\n\nConnection is saved to config files which are better to exclude from a git repository.\nBy default config path is `./config/private.json`. Passwords in configs are stored in an encrypted way.\n\nConfig sample:\n\n```json\n{\n  \"siteUrl\": \"https://contoso.sharepoint.com/sites/dev-a\",\n  \"strategy\": \"UserCredentials\",\n  \"username\": \"andrew.koltyakov@contoso.onmicrosoft.com\",\n  \"password\": \"bcccd4e6025...ZH+ZY5X2A==\"\n}\n```\n\n## Making changes\n\nNow you can apply changes to PnP JS Core project sources (your local copy).\nFollow [Getting Started: Contribute](https://github.com/SharePoint/PnP-JS-Core/wiki/Getting-Started:-Contribute) wiki page's instructions.\n\n## Debugging with PnP JS Core Debug\n\nIn `PnP-JS-Core-Debug/runners` project's folder create a `.ts` file.\n\nWrap file with:\n\n```TypeScript\nimport { Web } from './../../PnP-JS-Core/src/pnp';\nimport { initEnvironment as init } from './../utils/pnpnode';\nimport './../utils/setup';\n\ninit().then(async settings =\u003e {\n\n  let web = new Web(settings.siteUrl);\n  // executing methods to test\n\n}).catch(console.log);\n```\n\nPlace debug break points in PnP JS Core `.ts` sources or your custom code.\nOpen a runner which executes logic to test and start a debugger for the current file.\n\n![](/assets/vscode_debug_01.png)\n\nNow all the power of VS Code debugger is our oyster!\n\n![](/assets/vscode_debug_02.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoltyakov%2Fpnp-js-core-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoltyakov%2Fpnp-js-core-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoltyakov%2Fpnp-js-core-debug/lists"}