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

startDebugging method in vscode still return true even when the build fails #54214

rodrigovaras opened this Issue Jul 12, 2018 · 5 comments


None yet
6 participants

rodrigovaras commented Jul 12, 2018

Live share extension on the host side is using the startDebugging method to launch a debug configuration remotely. As part of step it will eventually need to invoke a task to build that could fail, the problem is that the API will not report 'false' value during the invocation.
Extract of the code here:

const result = await vscode.debug.startDebugging(folders ? folders[0] : undefined, debugConfiguration);
if (!result) {
// THIS code almost never get invoked....
throw new Error(Failed to launch debug configuration:${});

we would like a better mechanism to know what really happen in our launch invocation.
Maybe knowing:

  • If the build task was cancelled
  • task failed
  • Debug configuration is invalid
  • Failure to launch

Adding a new richer method may be better...

@weinand weinand added debug bug labels Jul 27, 2018

@weinand weinand added this to the On Deck milestone Jul 27, 2018


This comment has been minimized.


Eskibear commented Aug 22, 2018

I have exact the same problem with the API vscode.debug.startDebugging.

When was starting a Java debug session with the API vscode.debug.startDebugging, build error occurs. It popped up a message dialog letting me choose whether to "Proceed" or "Abort". This part is provided in extension "Debugger for Java". See:

After clicking "Abort", resolveDebugConfiguration returns "undefined".
According to the VS Code API , the debug session will not start.

Returning the value 'undefined' prevents the debug session from starting.

But actually vscode.debug.startDebugging still resolves "true", it does not match the API spec:

@return A thenable that resolves when debugging could be successfully started.


This comment has been minimized.


weinand commented Sep 13, 2018

duplicate of #53874

@weinand weinand closed this Sep 13, 2018

@weinand weinand added the *duplicate label Sep 13, 2018

@weinand weinand reopened this Sep 17, 2018

@weinand weinand modified the milestones: On Deck, September 2018 Sep 17, 2018


This comment has been minimized.


weinand commented Sep 17, 2018

After #53874 has been fixed it now becomes clear that there is another issue that prevents build errors from bubbling up to the extension API.

I've investigated this and created additional debt items #58822 and #58817. It would be great if we could resolve this item for September even if we are not able to fully resolve the debt items.

@weinand weinand assigned isidorn and unassigned weinand Sep 17, 2018

@isidorn isidorn modified the milestones: September 2018, October 2018 Sep 24, 2018

isidorn added a commit that referenced this issue Sep 28, 2018

JimiC added a commit to JimiC/vscode that referenced this issue Oct 5, 2018

JimiC added a commit to JimiC/vscode that referenced this issue Oct 5, 2018


This comment has been minimized.


roblourens commented Nov 2, 2018

Is it enough to verify that a build error reaches the startDebugging API? Or was there a more specific issue with it?


This comment has been minimized.


isidorn commented Nov 5, 2018

The startDebugging API was always returning true. To verify:

  1. Have a wrong launch configuration, verify that startDebuggin returns false
  2. Have a prelaunch task that fails and verify that startDebugging returns false if you decided not to continue debugging

@ramya-rao-a ramya-rao-a added the verified label Nov 9, 2018

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.