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

[regression in 1.46] noDebug:true is lost when calling debug.startDebugging() #100364

Closed
DanTup opened this issue Jun 17, 2020 · 11 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded

Comments

@DanTup
Copy link
Contributor

DanTup commented Jun 17, 2020

If you start a debug session dynamically, passing noDebug: true:

vscode.debug.startDebugging(
	vscode.workspace.workspaceFolders![0],
	{
		name: "Mock",
		request: "launch",
		type: "mock",
		program: '${file}',
		noDebug: true,
	},
);

In 1.46, this value gets lost when calling resolveDebugConfiguration:

resolveDebugConfiguration(folder: WorkspaceFolder | undefined, config: DebugConfiguration, token?: CancellationToken): ProviderResult<DebugConfiguration> {
	if (!config.noDebug) {
		vscode.window.showErrorMessage(`noDebug was not set to true when resolving debug config, despite being passed`);
	}
}

However in 1.45.1 and earlier, the value was correctly passed through. This results in a lot of commands/CodeLens links that are supposed to run without debugging, now running with debugging.

I've created a fork of MockDebug with the code from above to repro:

https://github.com/DanTup/vscode-repro-nodebug-lost

Run the extension and run the MockDebug: Run without debugging command.

@DanTup
Copy link
Contributor Author

DanTup commented Jun 17, 2020

@isidorn I don't know if this is related to #99743, but it appears to have changed in the most recent version and has broken a lot of functionality in Dart (there are many places we programatically spawn sessions without debugging - in some cases it's because debugging is not supported for those cases).

@isidorn isidorn self-assigned this Jun 17, 2020
@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2020

Hi @DanTup sorry about the breakage. We have fixed this in vscode insiders. Can you please try to reproduce with vscode insiders?
Also there will be a vscode recovery build soon which should contain the fix.

Potentially duplicate of #100265
Though if you can reproduce with vscode insiders, then it might be a different issue

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster labels Jun 17, 2020
@DanTup
Copy link
Contributor Author

DanTup commented Jun 17, 2020

@isidorn thanks for the quick response - though unfortunately it still repros using the example project above with this mornings Insiders:

Version: 1.47.0-insider
Commit: 84f52fe1c0124307046ac0f5443493cda946e60f
Date: 2020-06-17T06:56:23.406Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0

@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2020

@DanTup thanks for trying with vscode insiders. Investigating...

@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2020

@DanTup thanks for reporting. This was caused by a bad change I did and an even worse fix that I pushed. We will push this to the recovery release.

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release and removed info-needed Issue requires more information from poster unreleased Patch has not yet been released in VS Code Insiders labels Jun 17, 2020
@isidorn isidorn added this to the May 2020 Recovery milestone Jun 17, 2020
@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2020

Reopening to track for recovery

@DanTup
Copy link
Contributor Author

DanTup commented Jun 17, 2020

@isidorn great, thanks! I'll check this in the next insiders build when it's available.

isidorn added a commit that referenced this issue Jun 17, 2020
@isidorn isidorn closed this as completed Jun 17, 2020
@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2020

@DanTup can I ask you to please try out this version of VS Code. The issue should be fixed with it, we would just like that you verify so we are 100% sure. Thanks!
Here's the link for the build
mac https://az764295.vo.msecnd.net/stable/78ea4488eb6e195cb0736182fe9e5a0d68eb1c39/VSCode-darwin-stable.zip
win
https://az764295.vo.msecnd.net/stable/78ea4488eb6e195cb0736182fe9e5a0d68eb1c39/VSCodeSetup-x64-1.46.1.exe
linux
https://az764295.vo.msecnd.net/stable/78ea4488eb6e195cb0736182fe9e5a0d68eb1c39/code-stable-1592408577.tar.gz

@weinand
Copy link
Contributor

weinand commented Jun 17, 2020

The fix works for me: adding a "noDebug": true to a node.js launch config makes the target program run without debugging.

@weinand weinand added the verified Verification succeeded label Jun 17, 2020
@DanTup
Copy link
Contributor Author

DanTup commented Jun 17, 2020

Yep, it works for me too - on Stable when I click "Run" in my CodeLens, I still hit breakpoints. With the version above I do not. And when I use the Dart: Run All Tests command I can see it connecting debuggers in stable, but not in the version above.

Thanks!

@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2020

Thank you Dan Tup for letting us know.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@DanTup @weinand @isidorn and others