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

DebugConfigurationProvider only calls resolveDebugConfiguration #108835

Closed
WardenGnaw opened this issue Oct 16, 2020 · 3 comments
Closed

DebugConfigurationProvider only calls resolveDebugConfiguration #108835

WardenGnaw opened this issue Oct 16, 2020 · 3 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster

Comments

@WardenGnaw
Copy link
Member

Issue Type: Bug

Occurs in Insiders, not release.

We are trying to convert our DebugConfigurationProvider to only use resolveDebugConfigurationWithSubstitutedVariables.
However, in the scenario with no launch.json, it calls provideDebugConfigurations, then after a user selects a configuration. It only seems to call resolveDebugConfiguration.

I think it should also be calling resolveDebugConfigurationWithSubstitutedVariables

Actual:
image
Then nothing.

Expected:
image
image

Bug Version:
VS Code version: Code - Insiders 1.51.0-insider (89c002a, 2020-10-15T23:17:08.035Z)
OS version: Windows_NT x64 10.0.19041

Working Release Version:

Version: 1.50.1 (user setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 3000)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.85GB (45.49GB free)
Process Argv --crash-reporter-id b203f981-bd1f-4c33-9e1e-fd8717861426
Screen Reader no
VM 0%
Extensions (3)
Extension Author (truncated) Version
vscode-docker ms- 1.6.0
csharp ms- 1.23.3
cpptools ms- 1.1.0-insiders2
@connor4312 connor4312 assigned weinand and unassigned connor4312 Oct 16, 2020
@connor4312 connor4312 added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 16, 2020
@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Oct 17, 2020
@weinand weinand removed their assignment Oct 17, 2020
@weinand weinand added this to the October 2020 milestone Oct 17, 2020
@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2020

I have just tried this with latest VS Code insiders and it works just fine for me.
Here are my steps:

  1. Have a hello.js file. Do not have a launch.json
  2. Press F5 -> notice how the resolveDebugConfigurationWithSubstitutedVariables gets called on provider side

Also the whole milestone I was on vacation, so it is very strange that this would work for stable and not for insiders.

@WardenGnaw is it possible that you somehow change mock debug so we can clone and be able to reproduce this issue on our side?

@isidorn isidorn removed this from the October 2020 milestone Oct 23, 2020
@isidorn isidorn added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Oct 23, 2020
@WardenGnaw
Copy link
Member Author

WardenGnaw commented Oct 23, 2020

I just realized that this is my error. I forgot we rely on returning null instead of empty configuration {} in resolveDebugConfiguration to prompt provider to call provideDebugConfigurations.

It looks like there was an error that returning an empty object caused provideDebugConfigurations to be called in the current stable 1.50.1 and is now fixed in 1.51.0-insider. 😃

I hope you had a wonderful vacation!

Solution:

Add the snippet to resolveDebugConfiguration

if (!config || !config.type) {
   return null;
}

@isidorn
Copy link
Contributor

isidorn commented Oct 26, 2020

Glad you found the issue.
Yeah vacation was great, thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants
@weinand @isidorn @connor4312 @WardenGnaw and others