microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.5k stars 28.1k forks source link

Protocol: "inspector" inside launch.json is ignored #57943

Closed Kamilius closed 5 years ago

Kamilius commented 5 years ago

Issue Type: Bug

Steps:

  1. Create following configuration for mocha/typescript unit tests:
    {
    "type": "node",
    "request": "launch",
    "protocol": "inspector",
    "name": "Mocha Current File",
    "program": "${workspaceFolder}/packages/common/node_modules/mocha/bin/_mocha",
    "args": [
    "-r",
    "ts-node/register",
    "--timeout",
    "999999",
    "--colors",
    "${file}"
    ],
    "console": "integratedTerminal",
    "internalConsoleOptions": "neverOpen"
    }
  2. Run test against selected typescript spec file

Actual:

Same configuration works perfectly well on latest stable version of VSCode (just finished running both side by side).

Expected:

VS Code version: Code - Insiders 1.27.0-insider (7b9afc4196bda60b0facdf62cfc02815509b23d6, 2018-09-03T09:07:33.052Z) OS version: Darwin x64 17.7.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|5, 4, 3| |Memory (System)|16.00GB (0.03GB free)| |Process Argv|/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron| |Screen Reader|no| |VM|0%|
Extensions (60) Extension|Author (truncated)|Version ---|---|--- json-to-ts|Mar|1.5.5 vscode-html-scss|P-d|0.0.42 indenticator|Sir|0.6.0 html-css-class-completion|Zig|1.17.1 vscode-file-peek|abi|1.0.1 html-snippets|abu|0.2.1 vscode-ngrx-snippets|ahs|0.0.4 ng-template|Ang|0.1.10 npm-intellisense|chr|1.3.0 path-intellisense|chr|1.4.2 vscode-svgviewer|css|1.4.4 vscode-eslint|dba|1.5.0 vscode-protractor-snippets|dee|1.0.5 githistory|don|0.4.2 xml|Dot|2.3.2 vscode-babel-coloring|dza|0.0.4 gitlens|eam|8.5.6 EditorConfig|Edi|0.12.4 tslint|eg2|1.0.38 vscode-npm-script|eg2|0.3.5 prettier-vscode|esb|1.6.1 git-project-manager|fel|1.6.1 vscode-yarn|gam|1.6.0 todo-tree|Gru|0.0.82 beautify|Hoo|1.4.2 docthis|joe|0.7.1 angular-essentials|joh|0.4.0 Angular2|joh|6.1.5 vscode-colorize|kam|0.7.1 es6-angular-snips|kas|0.0.3 MagicPython|mag|1.0.12 code-coverage|mar|0.0.2 HTMLHint|mka|0.5.0 prettify-json|moh|0.0.3 vscode-scss|mrm|0.6.2 python|ms-|2018.7.1 debugger-for-chrome|msj|4.9.1 angular2-inline|nat|0.0.17 material-icon-theme|PKi|3.5.3 polymer-ide|pol|0.6.0 seti-icons|qin|0.1.3 vscode-sort-json|ric|1.13.0 vscode-icons|rob|7.25.0 sass-indented|rob|1.4.9 vscode-coverage-gutters|rya|2.1.1 salesforcedx-vscode|sal|43.14.0 salesforcedx-vscode-apex|sal|43.14.0 salesforcedx-vscode-apex-debugger|sal|43.14.0 salesforcedx-vscode-apex-replay-debugger|sal|43.14.0 salesforcedx-vscode-core|sal|43.14.0 salesforcedx-vscode-lightning|sal|43.14.0 salesforcedx-vscode-visualforce|sal|43.14.0 code-settings-sync|Sha|3.1.2 stylelint|shi|0.42.0 simontest|Sim|0.18.4 python|tht|0.2.3 vsfire|tob|1.3.2 vscode-todo-highlight|way|1.0.4 JasmineSnippets|xab|1.0.1 JavaScriptSnippets|xab|1.7.0 (3 theme extensions excluded)
roblourens commented 5 years ago

Can you try starting with --disable-extensions and running it again?

It looks like you don't have the Live Share extension installed but this seems like the kind of bug it could cause.

Kamilius commented 5 years ago

@roblourens running VSCode with --disable-extensions ?

roblourens commented 5 years ago

Right

Kamilius commented 5 years ago

@roblourens did it, having same issues

roblourens commented 5 years ago

I'm stumped, @weinand?

We release 1.27 today, I assume it's the same if you update?

Kamilius commented 5 years ago

My version of insider is Version 1.27.0-insider (1.27.0-insider) screen shot 2018-09-06 at 8 47 58 am

weinand commented 5 years ago

Since you didn't provide information about your setup, I came up with this project: bug57943.zip

This works for me just fine in VS Code 1.27.

My steps:

Breakpoint is hit.

What version of node.js are you using? What is the output on the integrated terminal when you hit F5?

I see this: 2018-09-06_11-25-54

weinand commented 5 years ago

Insiders has become Stable yesterday, but because of a serious issue we had to stop the release. Since I do not know whether you have upgraded already, you have to decide yourself what version to use. I suggest to try it in both.

Kamilius commented 5 years ago

Node.js version: v8.9.3 Output of integrated terminal is as follows: screen shot 2018-09-06 at 12 36 56 pm

Meanwhile I'll try to update my previously installed stable version and check how it goes there.

weinand commented 5 years ago

@Kamilius from the screenshot I noticed that you are trying to run the launch.json instead of a typescript file. This doesn't make a lot of sense. Please make sure that your active editor contains a typescript file because that's what your launch.json id refering to with the "${file}" argument.

Kamilius commented 5 years ago

Yeah that's my bad in terms of this exact example. But running against a proper file still brings same issue as you may see on a fresh screenshot below: screen shot 2018-09-06 at 12 42 29 pm

weinand commented 5 years ago

Please try with my project. Since I don't have your setup I cannot speculate about it.

Kamilius commented 5 years ago

Fails on your example: screen shot 2018-09-06 at 1 13 35 pm

screen shot 2018-09-06 at 1 11 28 pm

weinand commented 5 years ago

Is seems something in your VS Code setup is broken.

In the VS Code version that you are using to reproduce the issue, please go to the Extension viewlet and select "Show Installed Extension " from the drop down menu under "...". The list should be empty.

Then select "Show Built-in Extensions" and expand the "Feature" view and scroll down to Node-Debug. You should have these versions:

2018-09-06_12-18-11

weinand commented 5 years ago

What's the output of both commands?

Kamilius commented 5 years ago

@weinand

Is seems something in your VS Code setup is broken.

I've found that Node Debug was disabled and only Node Debug (legacy) was enabled. Enabling Node Debug solved my issue. On the other hand it is strange, that it was disabled, as I've never touched @builtin extensions...

Nevertheless - thanks for helping me in solving this setup issue

weinand commented 5 years ago

@Kamilius thanks for helping us getting this resolved.

@sandy081 are you aware of any issues why a built-in extension could be disabled accidentally? In addition, it should not be possible that "Node Debug (legacy)" is enabled if "Node Debug" is not (because Node Debug (legacy)" depends on "Node Debug"). I've created https://github.com/Microsoft/vscode/issues/58065 for this issue.

sandy081 commented 5 years ago

It can happen if a user tries to disable an extension that has a dependency to built in extension and selects to disable all.

From 1.27 I have changed this behaviour to not to ask to disable dependency extensions. Only the extension which is requested to disable will be disabled