Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verifying VS Code debugger with default configuration works on tests in our SDKs #10145

Merged
merged 3 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ Next, get the code:

If you have previously worked in this repo using the `npm` workflow, the first time you switch to using Rush you should commit or stash any untracked files and then get back to a clean state by running `rush reset-workspace` before proceeding any further. This will get rid of any latent package-lock files, as well as your existing (incompatible) node_modules directories. You can then proceed down the path outlined below.

### Warnings for VSCode users
### Using Visual Studio Code

#### Debugging

Debugging Node.js code in VSCode is [well documented](https://code.visualstudio.com/docs/nodejs/nodejs-debugging). However, starting from version 1.45.1, VSCode can automatically debug Node.js code in most cases without having to write custom `launch.json` files for that purpose and this is true for our SDKs code as well. A demonstration of that feature can be found in the [release notes](https://code.visualstudio.com/updates/v1_45#_automatic-debug-configurations).

#### Warnings

Visual Studio Code has a feature which will automatically fetch and install @types packages for you, using the standard npm package manager. This will cause problems with your node_modules directory, since Rush uses PNPM which lays out this directory quite differently. It's highly recommended that you ensure "Typescript: Disable Automatic Type Acquisition" is checked in your VSCode Workspace Settings (or ensure `typescript.disableAutomaticTypeAcquisition` is present in your .vscode/settings.json file).

Expand Down
37 changes: 0 additions & 37 deletions sdk/core/core-amqp/.vscode/launch.json

This file was deleted.

3 changes: 2 additions & 1 deletion sdk/core/core-arm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
"test": "npm run build && npm run unit-test && npm run integration-test",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "nyc mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors \"test/**/*.ts\"",
"unit-test:node": "mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors \"test/**/*.ts\"",
"cover:unit:node": "nyc npm run unit-test:node",
"pack": "npm pack 2>&1",
"prebuild": "npm run clean"
},
Expand Down
17 changes: 0 additions & 17 deletions sdk/core/core-auth/.vscode/launch.json

This file was deleted.

16 changes: 0 additions & 16 deletions sdk/core/core-auth/.vscode/tasks.json

This file was deleted.

28 changes: 0 additions & 28 deletions sdk/core/core-client/.vscode/launch.json

This file was deleted.

16 changes: 0 additions & 16 deletions sdk/core/core-client/.vscode/tasks.json

This file was deleted.

28 changes: 0 additions & 28 deletions sdk/core/core-http/.vscode/launch.json

This file was deleted.

3 changes: 2 additions & 1 deletion sdk/core/core-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
"test": "npm run build:test && npm run unit-test && npm run integration-test",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "node ./node_modules/karma/bin/karma start karma.conf.ts --browsers ChromeNoSecurity --single-run",
"unit-test:node": "cross-env TS_NODE_FILES=true nyc mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors --exclude \"test/**/*.browser.ts\" \"test/**/*.ts\"",
"unit-test:node": "cross-env TS_NODE_FILES=true mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors --exclude \"test/**/*.browser.ts\" \"test/**/*.ts\"",
"cover:unit:node": "nyc npm run unit-test:node",
"check:packagejsonversion": "ts-node ./.scripts/checkPackageJsonVersion.ts",
"check:foronlycalls": "ts-node ./.scripts/checkForOnlyCalls.ts",
"check:everything": "ts-node ./.scripts/checkEverything.ts",
Expand Down
28 changes: 0 additions & 28 deletions sdk/core/core-https/.vscode/launch.json

This file was deleted.

16 changes: 0 additions & 16 deletions sdk/core/core-https/.vscode/tasks.json

This file was deleted.

55 changes: 0 additions & 55 deletions sdk/cosmosdb/cosmos/.vscode/launch.json

This file was deleted.

11 changes: 0 additions & 11 deletions sdk/cosmosdb/cosmos/.vscode/settings.json

This file was deleted.

22 changes: 0 additions & 22 deletions sdk/cosmosdb/cosmos/.vscode/tasks.json

This file was deleted.

17 changes: 0 additions & 17 deletions sdk/eventhub/event-hubs/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,11 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Client Unit Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"bdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test-dist/index.js"
],
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "npm: build:test"
},
{
"type": "node",
"request": "launch",
"name": "Client Example",
"program": "${file}",
"preLaunchTask": "npm: build:samples",
"outFiles": [
"${workspaceFolder}/dist-esm/**/*.js"
],
Expand Down
36 changes: 0 additions & 36 deletions sdk/eventhub/event-processor-host/.vscode/launch.json

This file was deleted.

Loading