-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Cannot use undefined
as a parameter for vscode.debug.startDebugging
#37559
Comments
@changsi-an If you pass @isidorn we should fail more gracefully in this case, e.g. by not substituting any variables at all. |
@weinand I don't have any variables in my |
@isidorn most likely passing undefined to startDebugging results in the error from above in https://github.com/Microsoft/vscode/blob/1d632ec12cd4ec0fe4f8badfbb743d5bd2807cda/src/vs/workbench/parts/debug/electron-browser/debugService.ts#L905 |
@changsi-an good catch, thanks. You can try it out in vscode insiders in 4 days and let us know how ti works. |
|
And I get this error in devtools: |
@roblourens The error message @isidorn can we make this clearer? |
@weinand sure, I have improved the error message to be more precise in the case the launch.json does not exist. Now it simply says "'launch.json' does not exist." |
Oh, I get it. |
Is the bug fix released yet? I am still hitting |
No, it's in Insiders or the next stable release. |
Steps to Reproduce:
vscode.debug.startDebugging(undefined, myConfig)
, but I got the following error if I useundefined
as the first parameter.and my debugger session is terminated afterwards.
Notes:
then everything works as expected, I could see a debug session launched.
I have put all the attributes defined in the
"configurationAttributes"
ofpackage.json
to themyConfig
object (the 2nd parameter), and I declared none of those attributes asrequired
inpackage.json
.If I just launch a debug configuration using my debugger type from
launch.json
, everything works as expected.I tried to debug vscode code, the call to
vscode.debug.startDebugging()
can actually return successfully. And I do not see any exception thrown from the call. TheCannot read property
uriof undefined
error seem to be triggered from a later routine.By vscode.d.ts#L6105 , I should be able to use
undefined
as the first parameter.Reproduces without extensions: Unknown. No opportunity to check, because I am developing a extension.
The text was updated successfully, but these errors were encountered: